{
"name": "download-trigger",
"snippet": null,
"examples": [
{
"name": "download-trigger-basic",
"content": "const data = \"The quick brown fox jumps over the lazy dog\"\n\nexport const DownloadTriggerBasic = () => {\n return (\n \n \n \n )\n}\n",
"hasSnippet": false,
"importPaths": [
"import { Button, DownloadTrigger } from \"@chakra-ui/react\""
],
"importPath": "import { DownloadTrigger } from \"@chakra-ui/react\""
},
{
"name": "download-trigger-svg",
"content": "const data = String.raw`\n\n`\n\nexport const DownloadTriggerSvg = () => {\n return (\n \n \n \n )\n}\n",
"hasSnippet": false,
"importPaths": [
"import { Button, DownloadTrigger } from \"@chakra-ui/react\""
],
"importPath": "import { DownloadTrigger } from \"@chakra-ui/react\""
},
{
"name": "download-trigger-with-file-size",
"content": "const data = \"The quick brown fox jumps over the lazy dog\"\n\nexport const DownloadTriggerWithFileSize = () => {\n return (\n \n \n \n )\n}\n",
"hasSnippet": false,
"importPaths": [
"import { Button, DownloadTrigger, FormatByte } from \"@chakra-ui/react\"",
"import { LuDownload } from \"react-icons/lu\""
],
"importPath": "import { DownloadTrigger } from \"@chakra-ui/react\"",
"npmDependencies": [
"react-icons"
]
},
{
"name": "download-trigger-with-promise",
"content": "\"use client\"\nconst data = async () => {\n const res = await fetch(\"https://picsum.photos/200/300\")\n return res.blob()\n}\n\nexport const DownloadTriggerWithPromise = () => {\n return (\n \n \n \n )\n}\n",
"hasSnippet": false,
"importPaths": [
"import { Button, DownloadTrigger } from \"@chakra-ui/react\"",
"import { LuImageDown } from \"react-icons/lu\""
],
"importPath": "import { DownloadTrigger } from \"@chakra-ui/react\"",
"npmDependencies": [
"react-icons"
]
}
]
}