-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allowed passing customized icon for completed steps in Stepper
#2345
Conversation
Stepper
…TwinUI into uyen/stepper-custom-icon
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.
LGTM apart from one small comment.
…TwinUI into uyen/stepper-custom-icon
|
||
By default, each step circle shows the step number. However, users can customize the icon or content displayed for each step in the `Stepper` component by providing the `stepContent` property in each item of the `steps` array. | ||
|
||
This property is a function that takes the step index and returns custom content to represent the status of each step. A common use case for this customization is to indicate step completion. |
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.
nit: it no longer takes the step index.
This property is a function that takes the step index and returns custom content to represent the status of each step. A common use case for this customization is to indicate step completion. | |
This property is a function that returns custom content to represent the status of each step. A common use case for this customization is to indicate step completion. |
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 have made the change.
Changes
Added a new
stepContent
prop in thesteps
array forStepper
component which allows users passing in their customized icon or content to replace the default step number for completed steps.Testing
Added unit tests.
Docs
Added minor changeset. Updated documentation as well as stories for
Stepper
.After-PR TODO:
Stepper
#2345 (comment))