-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editable): add editable textarea element (#4443)
* feat(editable): add editable textarea element To maintain consistency of editable context, use union type of textarea and input element to reference element. * refactor(editable): change target element type * refactor(editable): add types on propgetter To simplify usage and the type safety, add types where it declared. * fix(editable): use prop getter v2 The 'height' attribute type that html elemenet delivered is not compatable with 'height' of chakra. So, use PropGetterV2 to resolve style incompatiblity. * fix(editable): use hook for styling textarea * fix(editable): add missing property referencing on styling * feat: add textarea to editableAnatomy * feat: add default styles for EditableTextarea * chore: update changeset Co-authored-by: Tim Kolberger <tim@kolberger.eu>
- Loading branch information
1 parent
356b3f8
commit fbe9462
Showing
9 changed files
with
363 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@chakra-ui/anatomy": minor | ||
--- | ||
|
||
Add `textarea` part to `editableAnatomy` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
"@chakra-ui/editable": minor | ||
--- | ||
|
||
Added the component `EditableTextarea` to `Editable`. Use the textarea element | ||
to handle multi line text input in an editable context. | ||
|
||
```tsx live=false | ||
<Editable defaultValue="Change me" onChange={console.log}> | ||
<EditablePreview /> | ||
<EditableTextarea /> | ||
</Editable> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@chakra-ui/theme": minor | ||
--- | ||
|
||
Add styles for new `textarea` element in `Editable` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fbe9462
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: