refactor(ui): update shared components and add ControlGroup, SidebarContainer
This commit is contained in:
@@ -13,13 +13,42 @@ import {
|
||||
} from './config';
|
||||
|
||||
interface Props {
|
||||
/**
|
||||
* Visual variant
|
||||
* @default 'default'
|
||||
*/
|
||||
variant?: LabelVariant;
|
||||
/**
|
||||
* Label size
|
||||
* @default 'sm'
|
||||
*/
|
||||
size?: LabelSize;
|
||||
/**
|
||||
* Uppercase text
|
||||
* @default true
|
||||
*/
|
||||
uppercase?: boolean;
|
||||
/**
|
||||
* Bold text
|
||||
* @default false
|
||||
*/
|
||||
bold?: boolean;
|
||||
/**
|
||||
* Icon snippet
|
||||
*/
|
||||
icon?: Snippet;
|
||||
/**
|
||||
* Icon placement
|
||||
* @default 'left'
|
||||
*/
|
||||
iconPosition?: 'left' | 'right';
|
||||
/**
|
||||
* Content snippet
|
||||
*/
|
||||
children?: Snippet;
|
||||
/**
|
||||
* CSS classes
|
||||
*/
|
||||
class?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ export type LabelVariant =
|
||||
| 'warning'
|
||||
| 'error';
|
||||
|
||||
export type LabelSize = 'xs' | 'sm' | 'md';
|
||||
export type LabelSize = 'xs' | 'sm' | 'md' | 'lg';
|
||||
|
||||
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]',
|
||||
lg: 'text-[0.8rem] md:text-[0.875rem]',
|
||||
};
|
||||
|
||||
export const labelVariantConfig: Record<LabelVariant, string> = {
|
||||
|
||||
Reference in New Issue
Block a user