{ "name": "empty-state", "file": "compositions/ui/empty-state", "snippet": "import { EmptyState as ChakraEmptyState, VStack } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface EmptyStateProps extends ChakraEmptyState.RootProps {\n title: string\n description?: string\n icon?: React.ReactNode\n}\n\nexport const EmptyState = React.forwardRef(\n function EmptyState(props, ref) {\n const { title, description, icon, children, ...rest } = props\n return (\n \n \n {icon && (\n {icon}\n )}\n {description ? (\n \n {title}\n \n {description}\n \n \n ) : (\n {title}\n )}\n {children}\n \n \n )\n },\n)\n", "examples": [ { "name": "empty-state-basic", "content": "export const EmptyStateBasic = () => {\n return (\n \n \n \n \n \n \n Your cart is empty\n \n Explore our products and add items to your cart\n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { EmptyState, VStack } from \"@chakra-ui/react\"", "import { LuShoppingCart } from \"react-icons/lu\"" ], "importPath": "import { EmptyState } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "empty-state-closed-component", "content": "export interface EmptyStateProps extends ChakraEmptyState.RootProps {\n title: string\n description?: string\n icon?: React.ReactNode\n}\n\nexport const EmptyState = React.forwardRef(\n function EmptyState(props, ref) {\n const { title, description, icon, children, ...rest } = props\n return (\n \n \n {icon && (\n {icon}\n )}\n {description ? (\n \n {title}\n \n {description}\n \n \n ) : (\n {title}\n )}\n {children}\n \n \n )\n },\n)\n", "hasSnippet": false, "importPaths": [ "import { EmptyState as ChakraEmptyState, VStack } from \"@chakra-ui/react\"", "import * as React from \"react\"" ], "importPath": "import { EmptyState } from \"@chakra-ui/react\"" }, { "name": "empty-state-sizes", "content": "export const EmptyStateSizes = () => {\n return (\n \n \n {(size) => (\n \n \n \n \n \n \n Your cart is empty\n \n Explore our products and add items to your cart\n \n \n \n \n )}\n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { EmptyState, For, Stack, VStack } from \"@chakra-ui/react\"", "import { LuShoppingCart } from \"react-icons/lu\"" ], "importPath": "import { EmptyState } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "empty-state-with-action", "content": "export const EmptyStateWithAction = () => {\n return (\n \n \n \n \n \n \n Start adding tokens\n \n Add a new design token to get started\n \n \n \n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Button, ButtonGroup, EmptyState, VStack } from \"@chakra-ui/react\"", "import { HiColorSwatch } from \"react-icons/hi\"" ], "importPath": "import { EmptyState } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "empty-state-with-list", "content": "export const EmptyStateWithList = () => {\n return (\n \n \n \n \n \n \n No results found\n \n Try adjusting your search\n \n \n \n Try removing filters\n Try different keywords\n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { EmptyState, List, VStack } from \"@chakra-ui/react\"", "import { HiColorSwatch } from \"react-icons/hi\"" ], "importPath": "import { EmptyState } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] } ] }