forked from mirrors/thatmattlove-hyperglass
6 lines
182 B
TypeScript
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;
|
|
};
|