import type { FC } from "react"; import { render } from "./render"; import type { ComponentWithConditionPropsWithFunctionChildren } from "./types"; import { _memo, _shallowFn } from "./utils"; /** * If the `` is the first one to have its condition evaluates to true * inside the parent `` it will be the only rendered. * @param props The props to pass down to the `` component */ export const CaseFn: FC = (props) => render(props); CaseFn.defaultProps = { children: null }; export const Case: FC = _memo(CaseFn, _shallowFn);