Fix glitch for Swatch

This commit is contained in:
okbel 2021-05-28 10:12:08 -03:00
parent 2fb9e8b712
commit a66a69fb19
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@
color: white !important;
}
.active.size {
.active {
@apply border-accents-9 border-2;
padding-right: 1px;
padding-left: 1px;
@ -46,6 +46,7 @@
}
.active.textLabel {
@apply border-accents-9 border-2;
padding-right: calc(1rem - 1px);
padding-left: calc(1rem - 1px);
}

View File

@ -34,7 +34,7 @@ const Swatch: FC<Omit<ButtonProps, 'variant'> & SwatchProps> = ({
[s.size]: variant === 'size',
[s.color]: color,
[s.dark]: color ? isDark(color) : false,
[s.textLabel]: !color && label && label.length < 4,
[s.textLabel]: !color && label && label.length > 3,
},
className
)