Merge branch 'master' of https://github.com/vercel/commerce into custom-checkout

This commit is contained in:
Bel Curcio
2021-06-03 12:37:47 -03:00
329 changed files with 5858 additions and 3515 deletions

View File

@@ -44,14 +44,15 @@ const Swatch: FC<Omit<ButtonProps, 'variant'> & SwatchProps> = ({
className={swatchClassName}
style={color ? { backgroundColor: color } : {}}
aria-label="Variant Swatch"
{...(label && color && { title: label })}
{...props}
>
{variant === 'color' && active && (
{color && active && (
<span>
<Check />
</span>
)}
{variant !== 'color' ? label : null}
{!color ? label : null}
</Button>
)
}