mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
20 lines
405 B
TypeScript
20 lines
405 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);
|