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.

6 lines (5 loc) 318 B
import { ReactElement, ReactNode } from "react"; import { BoolOrFn } from "./types"; import { Match, MatchProps } from "./Match"; export declare function isMatchElement(element: ReactNode): element is ReactElement<MatchProps, typeof Match>; export declare function isMatchValidCondition(condition: BoolOrFn): boolean;