-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TextField] Separate TextFieldHint into separate internal component. #2567
Conversation
I don't think so. But I think that we should support various font size. |
}; | ||
|
||
const defaultProps = { | ||
visible: true, |
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.
Looks like a typo.
When we have the choice between hidden
, show
and visible
, I would personally go for show
.
I also think that show
is what it was chosen in some other component.
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.
Yup good catch, and I'll change it to show. I just remembered we did underlineShow
in that other pull request, so I'll make it show here.
@oliviertassinari The |
I agree. I hope that we can use the css inheritance of the font size to let people change the font size. |
Mmm, that pull request is interesting. I haven't experimented much with the css em/rem stuff thoughtwould be interesting to get something like that working.
Agree with you here too. |
@subjectix I'm ok with this PR. Feel free to merge 👍 |
[TextField] Separate TextFieldHint into separate internal component.
@newoga Nice job 👍 👍 Thanks 🎉 |
Thanks! |
This is one of the tasks in #2555. It seeks to simplify the
TextField.jsx
component by extracting the hint text and its styling logic into its own separate internal component.Note: I saw this if condition on lines L252-254 that applies a line height to the hint text if a height property is found on the custom root style that is provided. This has not been accounted for, and am wondering if we really want to properly support changing heights of TextFields. If so, we should probably do it differently.