wealth/packages/island/src/molecules/detail-row/variants.ts

36 lines
983 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { cva } from 'class-variance-authority';
/**
* One key–value line (DS KV). `sm` for a receipt card, `md` (8px, the DS) for a detail sheet or a
* KeyValue group.
*/
export const detailRowVariants = cva('min-w-0', {
variants: {
size: {
sm: 'py-1.5',
md: 'py-2',
},
},
defaultVariants: { size: 'md' },
});
/**
* The value at the end, 15/26: regular unless `strong`; a status tone is always 600. Its parts
* (badge, value, copy) sit in one end-aligned row that wraps.
*/
export const detailValueVariants = cva(
'm-0 min-w-0 text-end text-body-compact leading-[1.625rem]',
{
variants: {
strong: { true: 'font-semibold', false: 'font-normal' },
tone: {
default: 'text-text-primary',
success: 'font-semibold text-success-text',
danger: 'font-semibold text-danger-text',
warning: 'font-semibold text-warning-text',
},
},
defaultVariants: { strong: false, tone: 'default' },
},
);