( variant: keyof typeof buttonStyles.variants = 'secondary', size: keyof typeof buttonStyles.sizes = 'md', disabled = false )
| 76 | |
| 77 | // Helper function to compose button classes |
| 78 | export function getButtonClass( |
| 79 | variant: keyof typeof buttonStyles.variants = 'secondary', |
| 80 | size: keyof typeof buttonStyles.sizes = 'md', |
| 81 | disabled = false |
| 82 | ): string { |
| 83 | const classes: string[] = [ |
| 84 | buttonStyles.base, |
| 85 | buttonStyles.sizes[size], |
| 86 | buttonStyles.variants[variant], |
| 87 | ]; |
| 88 | if (disabled) { |
| 89 | classes.push(buttonStyles.disabled); |
| 90 | } |
| 91 | return classes.join(' '); |
| 92 | } |
| 93 | |
| 94 | // ============================================ |
| 95 | // SHARED ACTION BUTTON STYLES |
no outgoing calls
no test coverage detected