UNPKG

@assistant-ui/react

Version:

Open-source TypeScript/React library for building production-grade AI chat experiences

43 lines • 1.87 kB
import { Primitive } from "../../utils/Primitive.js"; import { type ComponentRef, type ComponentPropsWithoutRef } from "react"; export declare namespace BranchPickerPrimitiveRoot { type Element = ComponentRef<typeof Primitive.div>; type Props = ComponentPropsWithoutRef<typeof Primitive.div> & { /** * Whether to hide the branch picker when there's only one branch available. * When true, the component will only render when multiple branches exist. * @default false */ hideWhenSingleBranch?: boolean | undefined; }; } /** * The root container for branch picker components. * * This component provides a container for branch navigation controls, * with optional conditional rendering based on the number of available branches. * It integrates with the message branching system to allow users to navigate * between different response variations. * * @example * ```tsx * <BranchPickerPrimitive.Root hideWhenSingleBranch={true}> * <BranchPickerPrimitive.Previous /> * <BranchPickerPrimitive.Count /> * <BranchPickerPrimitive.Next /> * </BranchPickerPrimitive.Root> * ``` */ export declare const BranchPickerPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & { asChild?: boolean | undefined; }, "ref"> & { render?: import("react").ReactElement | undefined; } & import("react").RefAttributes<HTMLDivElement>, "ref"> & { /** * Whether to hide the branch picker when there's only one branch available. * When true, the component will only render when multiple branches exist. * @default false */ hideWhenSingleBranch?: boolean | undefined; } & import("react").RefAttributes<HTMLDivElement>>; //# sourceMappingURL=BranchPickerRoot.d.ts.map