feat: implement basic token selection UI

This commit is contained in:
fragosti
2018-11-01 17:52:15 -07:00
parent 7de33c5dd9
commit ab245fe7de
6 changed files with 69 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
import { darken } from 'polished';
import { ColorOption, styled } from '../../style/theme';
import { cssRuleIfExists } from '../../style/util';
@@ -30,6 +32,7 @@ export interface ContainerProps {
opacity?: number;
cursor?: string;
overflow?: string;
darkenOnHover?: boolean;
}
export const Container =
@@ -64,6 +67,12 @@ export const Container =
${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')};
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')};
&:hover {
${props =>
props.darkenOnHover
? `background-color: ${darken(0.05, props.theme[props.backgroundColor || 'white'])}`
: ''};
}
`;
Container.defaultProps = {