Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface IProps {
- condition: boolean;
- wrap(wrapper: (children: any) => any): any;
- children: any;
- }
- export const ConditionalWrap = ({ condition, wrap, children }: IProps) =>
- condition ? wrap(children) : children;
Add Comment
Please, Sign In to add comment