| { | |
| "type": "composition", | |
| "npmDependencies": [], | |
| "fileDependencies": [ | |
| "compositions/ui/close-button" | |
| ], | |
| "id": "action-bar", | |
| "file": { | |
| "name": "action-bar.tsx", | |
| "content": "import { ActionBar, Portal } from \"@chakra-ui/react\"\nimport { CloseButton } from \"./close-button\"\nimport * as React from \"react\"\n\ninterface ActionBarContentProps extends ActionBar.ContentProps {\n portalled?: boolean\n portalRef?: React.RefObject<HTMLElement>\n}\n\nexport const ActionBarContent = React.forwardRef<\n HTMLDivElement,\n ActionBarContentProps\n>(function ActionBarContent(props, ref) {\n const { children, portalled = true, portalRef, ...rest } = props\n\n return (\n <Portal disabled={!portalled} container={portalRef}>\n <ActionBar.Positioner>\n <ActionBar.Content ref={ref} {...rest} asChild={false}>\n {children}\n </ActionBar.Content>\n </ActionBar.Positioner>\n </Portal>\n )\n})\n\nexport const ActionBarCloseTrigger = React.forwardRef<\n HTMLButtonElement,\n ActionBar.CloseTriggerProps\n>(function ActionBarCloseTrigger(props, ref) {\n return (\n <ActionBar.CloseTrigger {...props} asChild ref={ref}>\n <CloseButton size=\"sm\" />\n </ActionBar.CloseTrigger>\n )\n})\n\nexport const ActionBarRoot = ActionBar.Root\nexport const ActionBarSelectionTrigger = ActionBar.SelectionTrigger\nexport const ActionBarSeparator = ActionBar.Separator\n" | |
| }, | |
| "component": "ActionBar" | |
| } |