diff --git a/storybook/src/components/registry.tsx b/storybook/src/components/registry.tsx index f2e25c808..cda59b23a 100644 --- a/storybook/src/components/registry.tsx +++ b/storybook/src/components/registry.tsx @@ -83,8 +83,17 @@ export const Typography: React.FC = ({ overline: 'text-xs uppercase tracking-wide text-muted-foreground', } - const Element = variant.startsWith('h') ? variant as keyof JSX.IntrinsicElements : 'p' - return {content} + const combinedClass = `${variantClasses[variant]} ${className}` + + switch (variant) { + case 'h1': return

{content}

+ case 'h2': return

{content}

+ case 'h3': return

{content}

+ case 'h4': return

{content}

+ case 'h5': return
{content}
+ case 'h6': return
{content}
+ default: return

{content}

+ } } interface ButtonProps extends LuaComponentProps { @@ -96,7 +105,7 @@ interface ButtonProps extends LuaComponentProps { export const Button: React.FC = ({ variant = 'contained', - color = 'primary', + color: _color = 'primary', size = 'medium', className = '', children, @@ -126,11 +135,11 @@ export const Button: React.FC = ({ } interface IconProps extends LuaComponentProps { - name: string + name?: string size?: 'small' | 'medium' | 'large' } -export const Icon: React.FC = ({ name, size = 'medium', className = '' }) => { +export const Icon: React.FC = ({ name = 'default', size = 'medium', className = '' }) => { const sizeClasses = { small: 'text-sm', medium: 'text-xl', large: 'text-3xl' } // Simple emoji/text fallback for icons const iconMap: Record = { @@ -218,7 +227,7 @@ export const Alert: React.FC = ({ - color = 'default', + color: _color = 'default', className = '', children, }) => (