-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: stepperChanges related to the stepper.Changes related to the stepper.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.
Description
I've been struggling to use the Stepper component, as it seems to rely a lot on refs and React.cloneElement. This means that you can't simply compose the component together, as you need to know where and what-for refs, passed props are needed.
Here's a simple reproduction: https://stackblitz.com/edit/w2vekn
I've had to look around multiple files in the Stepper* tree to understand that you can fix the first example by passing any props along to the StepLabel.
I think it'd be simpler if the component used context instead of cloneElement.
The same visual glitches happen if you were to try to pull the Step component inside your own custom one and give that custom component as children to Stepper, if you do that, then you lose the connector.
oliviertassinari, stunaz, eps1lon and mymattcarroll
Metadata
Metadata
Assignees
Labels
ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: stepperChanges related to the stepper.Changes related to the stepper.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.