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

Feat: textfield allow component label #262

Merged
merged 5 commits into from
Jan 28, 2022

Conversation

seedy
Copy link
Contributor

@seedy seedy commented Jan 27, 2022

Description

TextField, allow label prop to be a Component.

The initial need is to allow nesting more elements than the field's label next to the label, such as tooltips and popovers.

A ReactNode could also make sense, but it would lose the bindings to the input internal state, which ensures a good UX.

I created a specific type for the TextFieldLabelProps, because they represent the requirement for any label component.

Preview

simplescreenrecorder-2022-01-27_17.35.27.mp4

Copy link
Contributor

@matthieuh matthieuh left a comment

Choose a reason for hiding this comment

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

LGTM

I have just 2 comments:

  • Label is not vertically aligned with the CircledIcon, it looks weirds to me
  • Not related to this PR but the minHeight on the popover content seems a bad ready that we should remove at some point

wdyt?

Copy link
Member

@gndz07 gndz07 left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker force-pushed the feat/textfield-allow-component-label branch from c0eee21 to 31676cc Compare January 28, 2022 13:52
@traefiker traefiker merged commit b8437d8 into traefik:master Jan 28, 2022
@seedy seedy linked an issue Jan 28, 2022 that may be closed by this pull request
@traefiker
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TextField] allow customizing label size
4 participants