mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-18 09:21:56 +08:00
12 lines
228 B
TypeScript
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;
|