@assistant-ui/react
Version:
Typescript/React library for AI Chat
1 lines • 1.18 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"sourcesContent":["import { Primitive } from \"@radix-ui/react-primitive\";\nimport { type ComponentRef, forwardRef, ComponentPropsWithoutRef } from \"react\";\nimport { If } from \"../message\";\n\nexport namespace BranchPickerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n hideWhenSingleBranch?: boolean | undefined;\n };\n}\n\nexport const BranchPickerPrimitiveRoot = forwardRef<\n BranchPickerPrimitiveRoot.Element,\n BranchPickerPrimitiveRoot.Props\n>(({ hideWhenSingleBranch, ...rest }, ref) => {\n return (\n <If hasBranches={hideWhenSingleBranch ? true : undefined}>\n <Primitive.div {...rest} ref={ref} />\n </If>\n );\n});\n\nBranchPickerPrimitiveRoot.displayName = \"BranchPickerPrimitive.Root\";\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAA4B,kBAA4C;AACxE,SAAS,UAAU;AAeb;AANC,IAAM,4BAA4B,WAGvC,CAAC,EAAE,sBAAsB,GAAG,KAAK,GAAG,QAAQ;AAC5C,SACE,oBAAC,MAAG,aAAa,uBAAuB,OAAO,QAC7C,8BAAC,UAAU,KAAV,EAAe,GAAG,MAAM,KAAU,GACrC;AAEJ,CAAC;AAED,0BAA0B,cAAc;","names":[]}