Skip to content

Commit

Permalink
Export "useEditableContext" hook (chakra-ui#7352)
Browse files Browse the repository at this point in the history
* Export "useEditableContext" hook

The abscence of "useEditableContext" export prevents the development of custom "Editable" implementations. For example, I want to create a wrapper around "Editable" which provides additional methods such as "renderPreview" to enable different values inside preview and input. Not having access to the context makes custom inegrations such as these very challenging. Please improve the flexibility & DX of Chakra by exporting this hook. Many thanks!

* docs: add changeset

---------

Co-authored-by: Segun Adebayo <joseshegs@gmail.com>
  • Loading branch information
DawidWraga and segunadebayo committed Mar 6, 2023
1 parent d7682b6 commit eb7cab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-apes-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chakra-ui/editable": patch
---

Export "useEditableContext" hook
1 change: 1 addition & 0 deletions packages/components/editable/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { Editable } from "./editable"
export type { EditableProps } from "./editable"
export { useEditableStyles } from "./editable-context"
export { useEditableContext } from "./editable-context"
export { EditableInput } from "./editable-input"
export type { EditableInputProps } from "./editable-input"
export { EditablePreview } from "./editable-preview"
Expand Down

0 comments on commit eb7cab9

Please sign in to comment.