Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Doesn't apply the correct props when multiple components of the same type are on the same pageΒ #71

@Reffyy

Description

@Reffyy

Code:

Button.stories.tsx

export const All = () => (
    <div>
        <Button className="primary" text="Primary"/>
        <Button className="secondary" text="Secondary"/>
    </div>
)

All.story = {
  decorators: [withSmartKnobs(), withKnobs]
}

Expected Result:

Screen Shot 2020-01-28 at 15 09 14

Actual Result:

Screen Shot 2020-01-28 at 15 09 32

This issue also applies when using the Docs addon (as it's a single page), meaning that all of the components within the page have the props of the first created component.

From what I can see, the values for the first component are stored against prop names when the page is navigated to and then the same values are used for every value for each component following. Could we try assigning the values to a unique property of each element instead?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions