Skip to content

Commit

Permalink
Fix style-lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pavestru committed May 25, 2018
1 parent e6355ab commit 3d8f9d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/a-choice/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
background-color: $color-bg--white;
}
}

&[disabled] {
.a-choice__input--controlled + .a-choice__label {
cursor: default;
color: $color-prim-gray-dusty;
border-color: $color-prim-gray-silver;
}
}
}
}

.a-choice__label {
Expand Down Expand Up @@ -67,12 +68,12 @@
color: $color-axa-blue;
background-color: $color-bg--white;
}

&:disabled + .a-choice__label,
&[disabled] + .a-choice__label {
cursor: default;
color: $color-prim-gray-dusty;
border-color: $color-prim-gray-silver;
}
}
}
}

2 comments on commit 3d8f9d2

@TheDadi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not a good solution. The problem your facing is a known problem when working with bolean attributes in react, which aren‘t input elements. The value of your boolean is converted into a string for example your checked with value false is converted into a string with value „false“ which results in a true when using it as a boolean value in code, cause the html5 spec says if a attribute is present its true, it doesnt care about the value it has. If its not present as attribute its a false.

@TheDadi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look at facebook/react#9230

Please sign in to comment.