UNPKG

472 BTypeScriptView Raw
1import { type JSX } from "react";
2export interface ShowProps<T> {
3 /**
4 * If `true`, it'll render the `children` prop
5 */
6 when: T | null | undefined;
7 /**
8 * The fallback content to render if `when` is `false`
9 */
10 fallback?: React.ReactNode;
11 /**
12 * The children to render if `when` is `true`
13 */
14 children: React.ReactNode | ((props: T) => React.ReactNode);
15}
16export declare function Show<T>(props: ShowProps<T>): JSX.Element;
17
\No newline at end of file