Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { SFC, ReactElement } from "react";
- export type MaybeProps = {
- value: boolean;
- children: ReactElement<any>;
- };
- export const Maybe: SFC<MaybeProps> = ({
- value,
- children = null
- }) => (value && children) ? children : null;
Add Comment
Please, Sign In to add comment