Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): add flex rule to accommodate long label text, update story #4787

Merged
merged 3 commits into from
Dec 2, 2019
Merged

fix(select): add flex rule to accommodate long label text, update story #4787

merged 3 commits into from
Dec 2, 2019

Conversation

jendowns
Copy link
Contributor

Closes #4757

In the deployed storybook environment, you can see that if the Select component's labelText is longer than the width of the inner <select> element, the caret icon's positioning is off:

Screen Shot 2019-11-27 at 9 43 08 AM

This PR adds a flex alignment rule to fix that issue & also adds labelText as a prop to the Select component story so that the label can be experimented with more easily:

Screen Shot 2019-11-27 at 9 50 26 AM

Changelog

New

  • add align-items: flex-start to Select component wrapper
  • add labelText prop to knobs in Select story

@jendowns jendowns requested a review from a team as a code owner November 27, 2019 15:52
@ghost ghost requested review from aledavila and asudoh November 27, 2019 15:52
@jendowns jendowns changed the title 4757 select flex fix(select): add flex rule to accommodate long label text Nov 27, 2019
@jendowns jendowns changed the title fix(select): add flex rule to accommodate long label text fix(select): add flex rule to accommodate long label text, update story Nov 27, 2019
@netlify
Copy link

netlify bot commented Nov 27, 2019

Deploy preview for the-carbon-components ready!

Built with commit d130c4a

https://deploy-preview-4787--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Nov 27, 2019

Deploy preview for carbon-elements ready!

Built with commit d130c4a

https://deploy-preview-4787--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Nov 27, 2019

Deploy preview for carbon-components-react ready!

Built with commit d130c4a

https://deploy-preview-4787--carbon-components-react.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @jendowns!

@asudoh asudoh requested a review from a team November 28, 2019 13:26
@ghost ghost requested review from designertyler and removed request for a team November 28, 2019 13:27
@asudoh asudoh merged commit 3b691a0 into carbon-design-system:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select box svg out of place if label is wider than select
4 participants