{ "name": "action-bar", "file": "compositions/ui/action-bar", "snippet": "import { ActionBar, Portal } from \"@chakra-ui/react\"\nimport { CloseButton } from \"@/components/ui/close-button\"\nimport * as React from \"react\"\n\ninterface ActionBarContentProps extends ActionBar.ContentProps {\n portalled?: boolean\n portalRef?: React.RefObject\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 \n \n \n {children}\n \n \n \n )\n})\n\nexport const ActionBarCloseTrigger = React.forwardRef<\n HTMLButtonElement,\n ActionBar.CloseTriggerProps\n>(function ActionBarCloseTrigger(props, ref) {\n return (\n \n \n \n )\n})\n\nexport const ActionBarRoot = ActionBar.Root\nexport const ActionBarSelectionTrigger = ActionBar.SelectionTrigger\nexport const ActionBarSeparator = ActionBar.Separator\n", "examples": [ { "name": "action-bar-basic", "content": "\"use client\"\nexport const ActionBarBasic = () => {\n const [checked, setChecked] = useState(false)\n return (\n <>\n setChecked(!!e.checked)}>\n \n \n Show Action bar\n \n \n \n \n \n \n 2 selected\n \n \n \n \n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { ActionBar, Button, Checkbox, Portal } from \"@chakra-ui/react\"", "import { useState } from \"react\"", "import { LuShare, LuTrash2 } from \"react-icons/lu\"" ], "importPath": "import { ActionBar } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "action-bar-with-close-trigger", "content": "\"use client\"\nexport const ActionBarWithCloseTrigger = () => {\n const [checked, setChecked] = useState(false)\n return (\n <>\n setChecked(!!e.checked)}\n >\n \n \n Show Action bar\n \n\n setChecked(e.open)}\n closeOnInteractOutside={false}\n >\n \n \n \n \n 2 selected\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import {\n ActionBar,\n Button,\n Checkbox,\n CloseButton,\n Portal,\n} from \"@chakra-ui/react\"", "import { useState } from \"react\"", "import { LuShare, LuTrash2 } from \"react-icons/lu\"" ], "importPath": "import { ActionBar } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "action-bar-with-dialog", "content": "\"use client\"\nexport const ActionBarWithDialog = () => {\n const [checked, setChecked] = useState(false)\n return (\n <>\n setChecked(!!e.checked)}>\n \n \n Check to select projects\n \n \n \n \n \n \n 4 selected\n \n\n \n\n \n\n \n \n \n \n \n \n \n \n \n Delete projects\n \n \n \n Are you sure you want to delete 4 projects?\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { ActionBar, Button, Checkbox, Dialog, Portal } from \"@chakra-ui/react\"", "import { useState } from \"react\"", "import { LuSquarePlus, LuTrash2 } from \"react-icons/lu\"" ], "importPath": "import { ActionBar } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] } ] }