lookingglass/hyperglass/ui/components/util/if.tsx
2021-01-01 11:32:35 -07:00

6 lines
182 B
TypeScript

import type { TIf } from './types';
export const If = (props: TIf) => {
const { c, render, children, ...rest } = props;
return c ? (render ? render(rest) : children) : null;
};