[Feature Request] StepIcon should be more customizable
See original GitHub issueHello, folks!
I’m having a problem in customize the component StepIcon inside of StepLabel specifically in line 86, component is like this in the last version of material-ui-next (v1.0.0-beta.47):
{icon && (
<span
className={classNames(classes.iconContainer, {
[classes.alternativeLabel]: alternativeLabel,
})}
>
<StepIcon
completed={completed}
active={active}
error={error}
icon={icon}
alternativeLabel={alternativeLabel}
/>
</span>
)}
This property didn’t permit edit the properties of the icon. Ok, but you will tell me that I can create a custom Icon but I will loss access to the props that is passed through Step, so, my proposal is do something like:
- add a stepIconProps to edit the props of StepIcon props including access to CSS API through classes prop.
{icon && (
<span
className={classNames(classes.iconContainer, {
[classes.alternativeLabel]: alternativeLabel,
})}
>
<StepIcon
completed={completed}
active={active}
error={error}
icon={icon}
alternativeLabel={alternativeLabel}
{...stepIconProps}
/>
</span>
)}
- Another way is transform this in a callback, so the user can access the icon number that is passed through Step component but is unacessible by the user that is using the component:
{icon && iconCallback(icon, ...other)}
So when you use StepLabel would be:
<StepLabel iconCallback={{ (icon) => {
return (
<MyCustomStepIcon>{icon}</MyCustomStepIcon>
)
} }} />
Regards,
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[Feature Request] StepIcon should be more customizable
Hello, folks! I'm having a problem in customize the component StepIcon inside of StepLabel specifically in line 86, component is like this ...
Read more >Icons in Vuetify VStepper? There's a way | by Greg Muka
In Vuetify, the stepper component is VStepper, and no, it's unfortunately not able to display custom icons (VIcons). There's a feature request ......
Read more >Step Icon | Free SVG / PNG, Premium Animated GIF / APNG ...
Animations can be customized and applied to single element of icons, making your design subtle and unique comparing to others. Customizable. All icons...
Read more >Icons - Telerik UI for ASP.NET AJAX - Documentation
Use embedded icons in RadStepper via the icon properties - `Icon` and `SuccessIcon`. Customize the icon element further with the `ClientIconTemplate`.
Read more >is there an option to change icon for completed step in ...
Simply include an ng-template that defines your custom icon, and indicate which original icon ('edit' or 'done') you're replacing.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m fine with option two too 😃.
Hi, isn’t this possible with “StepIconProps”:
<StepLabel StepIconProps={{ classes: { active: { color: "red" } } }} >