Repository URL to install this package:
|
Version:
2.1.14 ▾
|
import { styled } from 'styleh-components'
import {
Button,
ButtonText,
ButtonIcon,
} from '@skava/ui/dist/components/atoms/Button'
import { ToggleContentWrapper } from '@skava/ui/dist/components/molecules/ToggleList'
const StyledSwatchesButton = styled(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 var(--color-light-grey);
color: var(--color-black);
font-weight: 500;
${props =>
props.isSelected &&
styled.css `
border-width: 4px;
border-color: var(--color-blue);
`};
${props =>
props.isDisabled &&
styled.css `
opacity: 0.4;
color: var(--color-light-grey);
pointer-events: all;
&:hover {
cursor: not-allowed;
}
&:active {
pointer-events: none;
}
`};
${ButtonText} {
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 }