Files
cinny/src/app/components/message/placeholder/LinePlaceholder.css.ts
T

36 lines
1002 B
TypeScript
Raw Normal View History

2024-12-16 21:55:15 +11:00
import { ComplexStyleRule } from '@vanilla-extract/css';
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
import { ContainerColor, DefaultReset, color, config, toRem } from 'folds';
2023-10-06 13:44:06 +11:00
2024-12-16 21:55:15 +11:00
const getVariant = (variant: ContainerColor): ComplexStyleRule => ({
backgroundColor: color[variant].Container,
});
export const LinePlaceholder = recipe({
base: [
DefaultReset,
{
width: '100%',
height: toRem(16),
borderRadius: config.radii.R300,
},
],
variants: {
variant: {
Background: getVariant('Background'),
Surface: getVariant('Surface'),
SurfaceVariant: getVariant('SurfaceVariant'),
Primary: getVariant('Primary'),
Secondary: getVariant('Secondary'),
Success: getVariant('Success'),
Warning: getVariant('Warning'),
Critical: getVariant('Critical'),
},
},
defaultVariants: {
variant: 'SurfaceVariant',
2023-10-06 13:44:06 +11:00
},
2024-12-16 21:55:15 +11:00
});
export type LinePlaceholderVariants = RecipeVariants<typeof LinePlaceholder>;