Style <EdiText/> components with styled-components
masterYou can customize the appearance of <EdiText/> components using styled-components or standard CSS by targeting internal HTML elements via their editext attribute. Each customizable element has a unique editext attribute value.
Available Attribute Values
| Attr. Value | Description |
|---|---|
main-container | The main container |
view-container | The container in view mode |
edit-container | The container in edit mode |
button-container | The container for the save and cancel buttons |
validation-container | The container for the validation message area |
edit-button | The edit button |
save-button | The save button |
cancel-button | The cancel button |
input | The input element (can also be selected directly via input or textarea tags) |
hint | The hint container |
button[editext='cancel-button'] {
&:hover {
background: crimson;
color: #fff;
}
}
div[editext='view-container'] {
background: #6293c3;
padding: 15px;
border-radius: 5px;
color: #fff;
}
div[editext='validation-container'] {
color: #d3d3d3;
text-decoration: underline;
}
input,
textarea {
background: #1d2225;
color: #f4c361;
font-weight: bold;
border-radius: 5px;
}