feat(Icon): adding disabled prop to Icon#12
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12 +/- ##
==========================================
+ Coverage 84.24% 84.28% +0.03%
==========================================
Files 58 59 +1
Lines 787 789 +2
Branches 167 159 -8
==========================================
+ Hits 663 665 +2
Misses 120 120
Partials 4 4
Continue to review full report at Codecov.
|
52d8c3d to
d7e2ea5
Compare
There was a problem hiding this comment.
Let's also have a non-colored disabled icon here for completeness.
src/components/Icon/iconRules.ts
Outdated
There was a problem hiding this comment.
Opacity is good as it appears disabled, however, it will still take user interaction. Let's set pointerEvents: 'none' to prevent user interaction.
Then, let's leave the color as the default. This helps it fit in on any background. Imagine disabling a red icon on a gray background. It would disappear if made gray.
There was a problem hiding this comment.
levithomason
left a comment
There was a problem hiding this comment.
Address comments and merge 👍
d7e2ea5 to
0033f55
Compare
Icon (
disabledprop)This PR will introduce possibility to specify
disablediconsBased on react-old/pull/113 which is now closed
TODO
API Proposal
disabled
disabledproperty will disable icons by manipulatingcolorandopacityCSS stylesrenders