Files
DefectingCat.github.io/components/RUA/tab/TabItem.tsx
DefectingCat 7954c974da Add memo to components
Add suspense for dynamic import
2022-12-06 09:33:06 +08:00

19 lines
404 B
TypeScript

import clsx from 'clsx';
import React, { memo } from 'react';
export type ItemProps = {
value: string | number;
label: string | number;
showContent?: boolean;
children?: React.ReactNode;
};
const TabItem = ({ showContent, children }: ItemProps) => {
return (
<>
<div className={clsx('hidden', showContent && '!block')}>{children}</div>
</>
);
};
export default memo(TabItem);