Skip to content

Add ids to component containers #238

@n1313

Description

@n1313

I would like to ask you to add unique ids to component containers, something like <div id={ name + '-container' }>. It would help me have better CSS selectors in my visual testing suite: #ComponentName-container .ReactStyleguidist-Playground__preview instead of using :nth-of-type().

I understand that I can do it by having a custom component like https://github.com/sapegin/react-styleguidist/blob/master/examples/customised/styleguide/components/ReactComponent/index.jsx, but it will make updating styleguidist more difficult: I don't want to monitor upstream for changes in that file.

I also understand that isolated view exists but I can't use it for my task because I'm not using a webserver to host my docs for phantomjs, but feed them directly as file:/// which makes navigating to #!/ComponentName a bit complicated.

(I can make the change myself and send a PR later if you so prefer)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions