cap-collectif / ui

Design system of @cap-collectif with react • styled-components • styled-system
https://ds.cap-collectif.com/
MIT License
16 stars 0 forks source link

adding `goToStep` to `multiStepModal` #273

Closed MedElfadhelELHACHEMI closed 2 years ago

MedElfadhelELHACHEMI commented 2 years ago

:tophat: What? Why?

this Is a proposition to add a function to go a specific step of a multistep modal it's basically

const goToStep = (index: number) => setCurrentStep(index)

the need for this kind of control over the multistep-modal came from the SMS obviously and having dynamic multi step forms (Fun, i know)

this is in no way a permanent fix or the best way to handle this. The multiStepModal should be overhauled and remade according to the uses we have encountered.

:pushpin: Related Issues

NA

:art: Chromatic links

Chromatic PR Storybook

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/ui.cjs.production.min.js 259.3 KB (+0.01% 🔺)
dist/ui.esm.js 252.44 KB (+0.01% 🔺)
RoxBow commented 2 years ago

Plus utile, les étapes qui ne doivent pas être affichés dans la modal dans certain cas sont juste conditionnées (fix sur les conditions fait dans #276)