Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import { styled } from 'styleh-components'
import { Button, ButtonLabel, ButtonIcon } from 'atoms/Button'
import { ToggleContentWrapper } from 'molecules/ToggleList'
const StyledSwatchesButton = styled.withComponent(Button) `
outline: none;
width: auto;
min-height: rem(48);
height: rem(48);
padding: 0 rem(14);
margin: 0 $spacing $spacing 0;
/* @todo don't use border */
/* transition: border 0.24s ease-in-out; */
box-sizing: border-box;
background-color: transparent;
border: 1px solid #a6afc1;
color: #2C2C2C;
font-weight: 500;
${props =>
props.isSelected &&
styled.css `
border-width: 4px;
border-color: $colors-actionblue;
`};
${props =>
props.isDisabled &&
styled.css `
opacity: 0.4;
color: #a6afc1;
pointer-events: all;
&:hover {
cursor: not-allowed;
}
&:active {
pointer-events: none;
}
`};
${ButtonLabel} {
color: inherit;
text-transform: capitalize;
margin: 0;
font-weight: 500;
}
`
const SwatchWrapper = styled.div `
display: flex;
flex-direction: column;
${ToggleContentWrapper} {
flex-wrap: wrap;
}
`
export { StyledSwatchesButton, SwatchWrapper }