-
Notifications
You must be signed in to change notification settings - Fork 55
feat(icon): adding xSpacing=['none'|'before'|'after'|'both']
prop to Icon
#22
Conversation
@mnajdova @kuzhelov @levithomason |
Not sure about using |
Codecov Report
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
- Coverage 84.28% 83.58% -0.71%
==========================================
Files 59 59
Lines 789 804 +15
Branches 159 163 +4
==========================================
+ Hits 665 672 +7
- Misses 120 128 +8
Partials 4 4
Continue to review full report at Codecov.
|
xSpacing=['none'|'left'|'right'|'both']
prop to Icon
@miroslavstastny thx for sharing this; once @levithomason gets back we can definitely amend the naming; updated proposal after discussing with @mnajdova and Hugh: |
The naming convention for this prop is really good, we can reuse this for the box model in the theming. I agree with @miroslavstastny for replacing the left and right with before and after, because that way we can be consistent for the potential adding of the ySpacing in the future. Replace them and we are good to merge this PR in order to unblock the other PRs and address potential changes after the theme PR is merged. |
ok, updated one more time after discussing with @miroslavstastny and @mnajdova ; thx guys: xSpacing=['none'|'before'|'after'|'both'] |
xSpacing=['none'|'left'|'right'|'both']
prop to IconxSpacing=['none'|'before'|'after'|'both']
prop to Icon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to be merged here in order to unblock the other PRSs. We will return to this when implementing the box model for the theming. Thanks for the changes!
Proposing we use <Icon fitted />
<Icon fitted='start' />
<Icon fitted='end' /> |
Icon
This PR will introduce possibility to specify
xSpacing=['none'|'before'|'after'|'both']
prop on an Icon component in order to adjust horizontal space around icons.TODO
API Proposal
xSpacing
An icon can achieve the following horizontal spacing:
xSpacing='none'
: no space to before or after the icon;xSpacing='before'
: space before the icon;xSpacing='after'
: space after the icon;xSpacing='both'
: space before and afer the icon;generates: