MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / fixHeight

Function fixHeight

apps/start/src/components/ui/button.tsx:52–72  ·  view source on GitHub ↗
({
  autoHeight,
  size,
}: {
  autoHeight?: boolean;
  size: ButtonProps['size'];
})

Source from the content-addressed store, hash-verified

50}
51
52function 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
74const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
75 (

Callers 1

button.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected