{ "name": "editable", "snippet": null, "examples": [ { "name": "editable-basic", "content": "export const EditableBasic = () => (\n \n \n \n \n)\n", "hasSnippet": false, "importPaths": [ "import { Editable } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-controlled", "content": "\"use client\"\nexport const EditableControlled = () => {\n const [name, setName] = useState(\"\")\n return (\n setName(e.value)}\n placeholder=\"Click to edit\"\n >\n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable } from \"@chakra-ui/react\"", "import { useState } from \"react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-disabled", "content": "export const EditableDisabled = () => {\n return (\n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-with-controls", "content": "export const EditableWithControls = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable, IconButton } from \"@chakra-ui/react\"", "import { LuCheck, LuPencilLine, LuX } from \"react-icons/lu\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"", "npmDependencies": [ "react-icons" ] }, { "name": "editable-with-custom-component", "content": "export const EditableWithCustomComponent = () => {\n return (\n \n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable, Input } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-with-double-click", "content": "export const EditableWithDoubleClick = () => (\n \n \n \n \n)\n", "hasSnippet": false, "importPaths": [ "import { Editable } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-with-final-focus", "content": "\"use client\"\nexport const EditableWithFinalFocus = () => {\n const ref = useRef(null)\n\n return (\n \n ref.current}\n defaultValue=\"Final fantasy\"\n >\n \n \n \n Edit\n Cancel\n Submit\n \n \n\n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable, Input, Stack } from \"@chakra-ui/react\"", "import { useRef } from \"react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-with-store", "content": "\"use client\"\nexport const EditableWithStore = () => {\n const editable = useEditable({\n defaultValue: \"Click to edit\",\n })\n\n return (\n \n \n \n \n \n {editable.editing ? \"editing\" : \"not editing\"}\n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Code, Editable, Stack, useEditable } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" }, { "name": "editable-with-textarea", "content": "export const EditableWithTextarea = () => {\n return (\n \n \n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Editable } from \"@chakra-ui/react\"" ], "importPath": "import { Editable } from \"@chakra-ui/react\"" } ] }