2025-01-02 10:28:18 +08:00

12 lines
228 B
TypeScript

export type ShowProps = {
when: boolean;
children: React.ReactNode;
fallback?: React.ReactNode;
};
const Show = ({ when, children, fallback }: ShowProps) => {
return when ? children : fallback;
};
export default Show;