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.

8 lines (7 loc) 214 B
import { ReactNode } from "react"; import { BoolOrFn } from "./types"; export type MatchProps = { children: ReactNode; when: BoolOrFn; }; export declare function Match({ children }: MatchProps): ReactNode;