21 lines
798 B
TypeScript
21 lines
798 B
TypeScript
import { cva } from 'class-variance-authority';
|
|
|
|
/** A pill you press to pick one of many, such as a market; a set sits in a wrapping row. */
|
|
export const chipVariants = cva(
|
|
'rounded-full border px-4 whitespace-nowrap transition-colors duration-120 ease-standard focus-visible:focus-ring actionable:cursor-pointer disabled:frozen',
|
|
{
|
|
variants: {
|
|
selected: {
|
|
true: 'border-action-primary bg-action-primary text-text-on-action actionable:hover:bg-action-primary-hover',
|
|
false:
|
|
'border-transparent bg-action-primary-muted text-action-primary-text actionable:hover:border-action-primary',
|
|
},
|
|
size: {
|
|
sm: 'min-h-control-sm px-3.5',
|
|
md: 'min-h-control-md',
|
|
},
|
|
},
|
|
defaultVariants: { selected: false, size: 'md' },
|
|
},
|
|
);
|