lookingglass/hyperglass/ui/components/Util/If.tsx

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;
};