Function
fixHeight
({
autoHeight,
size,
}: {
autoHeight?: boolean;
size: ButtonProps['size'];
})
Source from the content-addressed store, hash-verified
| 50 | } |
| 51 | |
| 52 | function fixHeight({ |
| 53 | autoHeight, |
| 54 | size, |
| 55 | }: { |
| 56 | autoHeight?: boolean; |
| 57 | size: ButtonProps['size']; |
| 58 | }) { |
| 59 | if (autoHeight) { |
| 60 | switch (size) { |
| 61 | case 'lg': |
| 62 | return 'h-auto min-h-11 py-2'; |
| 63 | case 'icon': |
| 64 | return 'h-auto min-h-8 py-1'; |
| 65 | case 'default': |
| 66 | return 'h-auto min-h-10 py-2'; |
| 67 | default: |
| 68 | return 'h-auto min-h-8 py-1'; |
| 69 | } |
| 70 | } |
| 71 | return ''; |
| 72 | } |
| 73 | |
| 74 | const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( |
| 75 | ( |
Tested by
no test coverage detected