Remove hardcoded width
This commit is contained in:
parent
5b991968f0
commit
ef8726f92e
|
@ -5,7 +5,7 @@ import { classnames } from "../utils/classnames";
|
||||||
type Props = {
|
type Props = {
|
||||||
tabs: {
|
tabs: {
|
||||||
label: string;
|
label: string;
|
||||||
Icon?: ComponentType<{ size?: string }>;
|
Icon?: ComponentType;
|
||||||
}[];
|
}[];
|
||||||
onTabChange: (index: number) => void | Promise<void>;
|
onTabChange: (index: number) => void | Promise<void>;
|
||||||
tabIndex: number;
|
tabIndex: number;
|
||||||
|
@ -23,7 +23,7 @@ export function Tabs({ tabs, onTabChange, tabIndex }: Props) {
|
||||||
)}
|
)}
|
||||||
onClick={() => onTabChange(index)}
|
onClick={() => onTabChange(index)}
|
||||||
>
|
>
|
||||||
{tab.Icon && <tab.Icon size={"1rem"} />}
|
{tab.Icon && <tab.Icon />}
|
||||||
<span>{tab.label}</span>
|
<span>{tab.label}</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in New Issue