Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(Checkbox): add labelPosition prop #1578

Merged
merged 10 commits into from
Jul 3, 2019
Merged

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jul 3, 2019

Fixes #1535.

labelPosition={start|end}

This PR adds a new labelPosition prop. Styles for a gap between label and icon was inspired by Flex component.

image

Docs refactor

  • Disabled example was moved to States section
  • Added an example for Checked state

@@ -17,6 +17,10 @@ const checkboxStyles: ComponentSlotStylesInput<CheckboxProps & CheckboxState, Ch
color: v.disabledColor,
cursor: 'default',
}),

'> *:not(:last-child)': {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about this selector. Do we really need this complication?

@codecov
Copy link

codecov bot commented Jul 3, 2019

Codecov Report

Merging #1578 into master will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1578      +/-   ##
==========================================
- Coverage   71.68%   71.67%   -0.01%     
==========================================
  Files         848      848              
  Lines        6911     6916       +5     
  Branches     1981     1984       +3     
==========================================
+ Hits         4954     4957       +3     
- Misses       1951     1953       +2     
  Partials        6        6
Impacted Files Coverage Δ
...emes/base/components/Checkbox/checkboxVariables.ts 0% <ø> (ø) ⬆️
.../themes/base/components/Checkbox/checkboxStyles.ts 8.33% <0%> (-1.67%) ⬇️
...ackages/react/src/components/Checkbox/Checkbox.tsx 80% <100%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 552bd70...c167640. Read the comment docs.

@layershifter layershifter merged commit 442ff22 into master Jul 3, 2019
@delete-merged-branch delete-merged-branch bot deleted the feat/checkbox-label branch July 3, 2019 16:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label for Checkbox component positioning on the left
2 participants