Skip to content

feat(Checkbox): add asFlexbox prop to allow for different layout styles - #756

Merged
eszthoff merged 2 commits into
masterfrom
jf-2981-imrove-checkbox-and-labelpicker-layout
May 11, 2022
Merged

feat(Checkbox): add asFlexbox prop to allow for different layout styles#756
eszthoff merged 2 commits into
masterfrom
jf-2981-imrove-checkbox-and-labelpicker-layout

Conversation

@eszthoff

@eszthoff eszthoff commented May 11, 2022

Copy link
Copy Markdown
Contributor

When using checkboxes in LabelPicker in browsers that show scroll bars in the traditional way (not as overlays) the layout breaks and labels are displayed in a separate line from the checkbox itself. In order to fix this, we need the checkbox to be in a flexbox. However, this as default behaviour can negatively effect already existing implementations. Hence this option is added via a new prop.

This new prop is now used in LabelPicker.

This PR also fixes a small bug with passing style and className to Checkbox that were applied to the wrong HTML element.

Checklist

  • The implementation has been manually tested and complies with Textkernel browser support guidelines
  • The implementation complies with accessibility standards.
  • The component has a displayName defined.
  • The component comes with a detailed PropTypes (and defaultProps) definition.
  • Component PropTypes are sufficiently described / documented.
  • There is a story in Storybook.

@eszthoff
eszthoff merged commit 5e39cf7 into master May 11, 2022
@eszthoff
eszthoff deleted the jf-2981-imrove-checkbox-and-labelpicker-layout branch May 11, 2022 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants