UNPKG

components-switch

Version:

A lightweight React utility component library featuring Switch and Match for conditional rendering, inspired by SolidJS. Simplifies readable and declarative conditional logic in JSX.

4 lines (3 loc) 152 B
import { ReactElement } from "react"; export type OneOrMore<T> = ReactElement<T> | ReactElement<T>[]; export type BoolOrFn = boolean | (() => boolean);