update checkbox / radio input styles
This commit is contained in:
parent
b6b23b5583
commit
ac95dea827
3 changed files with 10 additions and 3 deletions
|
@ -106,12 +106,10 @@ export class FormRow extends React.PureComponent {
|
|||
}
|
||||
|
||||
onFocus() {
|
||||
//this._field.focus();
|
||||
this.setState({ isFocus: true });
|
||||
}
|
||||
|
||||
onBlur() {
|
||||
//this._field.focus();
|
||||
this.setState({ isFocus: false });
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,8 @@ class FormField extends React.PureComponent {
|
|||
renderElementInsideLabel =
|
||||
this.props.label && formFieldNestedLabelTypes.includes(this.props.type);
|
||||
|
||||
const isCheck = this.refs.field && this.refs.field.checked ? true : false;
|
||||
|
||||
delete otherProps.type;
|
||||
delete otherProps.label;
|
||||
delete otherProps.hasError;
|
||||
|
@ -177,7 +179,8 @@ class FormField extends React.PureComponent {
|
|||
htmlFor={elementId}
|
||||
className={
|
||||
"form-field__label " +
|
||||
(isError ? "form-field__label--error" : "")
|
||||
(isError ? "form-field__label--error" : "") +
|
||||
(isCheck ? " checked" : "")
|
||||
}
|
||||
>
|
||||
{element}
|
||||
|
|
|
@ -155,6 +155,12 @@ input[readonly]:focus {
|
|||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
&.checked {
|
||||
color: var(--text-color) !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.form-row__label-row .form-field__label--error {
|
||||
|
|
Loading…
Reference in a new issue