chore(Label): add separate file for Label types

This commit is contained in:
Ilia Mashkov
2026-02-25 10:00:36 +03:00
parent f134a343be
commit 121eab54d9

View File

@@ -0,0 +1,29 @@
/**
* Shared config.
* Import from here in each component to keep maps DRY.
*/
export type LabelVariant =
| 'default'
| 'accent'
| 'muted'
| 'success'
| 'warning'
| 'error';
export type LabelSize = 'xs' | 'sm' | 'md';
export const labelSizeConfig: Record<LabelSize, string> = {
xs: 'text-[0.5rem]',
sm: 'text-[0.5625rem] md:text-[0.625rem]',
md: 'text-[0.625rem] md:text-[0.6875rem]',
};
export const labelVariantConfig: Record<LabelVariant, string> = {
default: 'text-neutral-900 dark:text-neutral-100',
accent: 'text-brand',
muted: 'text-neutral-400 dark:text-neutral-500',
success: 'text-green-600 dark:text-green-400',
warning: 'text-yellow-600 dark:text-yellow-400',
error: 'text-brand',
};