You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some stories require one or more unique ids to bind inner components together.
For example:
Label stories require to bind htmlFor from a Label on an inputid prop
TextField stories require a unique id prop
Input stories require to bind htmlFor from a Label on Inputid prop
Radix-UI already implemented an IdProvider for its primitives, but it seems not to expose its api.
Requirements
We need to be able duplicate a story (with .bind({})) without duplicating these unique ids.
As we may need multiple unique ids inside of a single story, it would be helpful to be able to configure how many ids we want, and receive them as an array.
Ex:
const [id1, id2, id3, id4] = makeUniqueIds(4);
Dependencies
uuid and uuid-browser are already dependencies of @storybook/addon-actions. We could reuse the library if we have no better option.
The text was updated successfully, but these errors were encountered:
Description
Some stories require one or more unique ids to bind inner components together.
For example:
Label
stories require to bindhtmlFor
from aLabel
on aninput
id
propTextField
stories require a uniqueid
propInput
stories require to bindhtmlFor
from aLabel
onInput
id
propRadix-UI already implemented an
IdProvider
for its primitives, but it seems not to expose its api.Requirements
We need to be able duplicate a story (with
.bind({})
) without duplicating these unique ids.As we may need multiple unique ids inside of a single story, it would be helpful to be able to configure how many ids we want, and receive them as an array.
Ex:
Dependencies
uuid
anduuid-browser
are already dependencies of@storybook/addon-actions
. We could reuse the library if we have no better option.The text was updated successfully, but these errors were encountered: