-
Notifications
You must be signed in to change notification settings - Fork 101
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(ui-number-input): add renderIcons prop #1819
Conversation
|
@@ -226,7 +234,11 @@ const propTypes: PropValidators<PropKeys> = { | |||
onKeyDown: PropTypes.func, | |||
inputMode: PropTypes.oneOf(['numeric', 'decimal', 'tel']), | |||
textAlign: PropTypes.oneOf(['start', 'center']), | |||
allowStringValue: PropTypes.bool | |||
allowStringValue: PropTypes.bool, | |||
renderIcons: PropTypes.shape({ |
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.
Please add the "renderIcons" prop to the allowedProps list as well (see below in the code)
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.
Fixed
@@ -166,6 +166,14 @@ type NumberInputOwnProps = { | |||
* sets the input type to string and allows string as value | |||
*/ | |||
allowStringValue?: boolean | |||
|
|||
/** | |||
* Definition of the icons to be rendered for increase and decrease buttons |
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.
Kinda nitpicky: Since this text acts as the documentation for the prop on the insUI docs page, I would rephrase it to something like this:
"Sets the icons to be rendered for increase and decrease buttons"
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.
Fixed
…ment buttons Closes: CLX-261
6fa4037
to
df2fc56
Compare
Closes: CLX-261
Add
renderIcons
prop to make the increase/decrease buttons customizable with externally defined iconsTEST PLAN:
Chromatic test for rendered icons and unit test to ensure unchanged behaviour