You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+21
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,27 @@ onEditingStart|function|No||Function that will be called when the editing mode i
78
78
showButtonsOnHover|bool|No|`false`|Set it to `true` if you want to display action buttons **only** when the text hovered by the user. See [here](https://alioguzhan.github.io/react-editext/#show-on-hover)
79
79
submitOnEnter|bool|No|`false`|Set it to `true` if you want to submit the form when `Enter` is pressed. __Be careful if you have multiple instances of `<EdiText/>` on the same page.__
80
80
81
+
## Styling with `styled-components`
82
+
83
+
84
+
You can style your `<EdiText/>` components with `styled-components` or similar libraries. You can either target internal HTML elements by their `type` ( or `order`) , or you can you can select them by attribute values.
85
+
86
+
Each customizable HTML element has a `editext=xxx` attribute. Use below as a reference table:
87
+
88
+
|Attr. Name|Description|
89
+
|----------|-----------|
90
+
|`view-container`| the container in `view` mode|
91
+
|`edit-container`| the container in `edit` mode|
92
+
|`button-container`| the container for the `save` and `cancel` buttons|
93
+
|`edit-button`| use this to style the __edit button__|
94
+
|`save-button`| use this to style the __save button__|
95
+
|`cancel-button`| use this to style the __cancel button__|
96
+
|`input`| There is only one input. You can select it directly or just use this attr value. |
97
+
|`hint`| To style the hint container. |
98
+
99
+
> See [the example code](https://alioguzhan.github.io/react-editext/#styled-components).
0 commit comments