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
Add inputHeight
prop
#886
Add inputHeight
prop
#886
Conversation
724ec38
to
4eafb44
Compare
font: { input: { lineHeight } }, | ||
spacing: { inputPadding, displayTextPaddingVertical }, | ||
} = reactDates; | ||
const inputHeight = getInputHeight({ lineHeight, inputPadding, displayTextPaddingVertical }); |
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.
i'm confused; how can all this logic be replaced by just passing down a prop? I'm fine with it being overrideable, but wouldn't the default need this same logic?
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.
Not really because once you set the height to a fixed value, this padding doesn't affect it anymore. Although I guess that the displayTextPadding
might still increase the whole thing... it's not really being used anymore, so this might be an opportunity just to axe it (it's kind of a weird pattern that doesn't make terribly much sense now that we have a real input).
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.
Nope, I'm definitely wrong. Let me reinvestigate!
@ljharb so (1) I think I'm going to get rid of the
I kind of prefer 1... but idk if that's oversimplifying. |
Closing! Don't think this is a level of customization we are going to pursue. |
This allows for complete customization of the inputHeight via prop. It also cleans up some logic that was introduced with the
verticalSpacing
prop (although I'm not counting the deletion of thegetInputHeight
method as breaking because that change had not yet been released).I was considering changing the theme props related to input and displaytext padding ... but I'm not sure that it is necessary? They do technically apply but I guess they are not as meaningful? I would take thoughts on that.
to: @gabergg @ljharb @erin-doyle @noratarano @airbnb/webinfra