Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement side nav grouping of components #147

Open
johno opened this issue May 22, 2018 · 2 comments
Open

Implement side nav grouping of components #147

johno opened this issue May 22, 2018 · 2 comments

Comments

@johno
Copy link
Member

johno commented May 22, 2018

No description provided.

@johno
Copy link
Member Author

johno commented May 22, 2018

Toying around with potential APIs:

Props

Prop based with category and categories, the latter accepting an array to place an example in multiple nav sections.

<Example name="Button" category="Elements">
  <Button>Hello, world!</Button>
</Example>

Composition

A Section/Category component:

<Section name="Elements">
  <Example name="Button">
    <Button>Hello, world!</Button>
  </Example>
</Section>

Thoughts

Right now I'm leaning more towards the composition approach. Especially since this lends itself to being more extensible down the road. For example, being able to filter the Library based on Section name or being able to have multiple levels of Sections in a nav.

@jxnblk
Copy link
Member

jxnblk commented May 22, 2018

For the first example, I’d imagine allowing an api with a categories prop where multiple keywords could be passed in for tagging.

The first example would mean not having to recursively find children, and with the second, I assume we might want to allow nested sections.

Thinking about this maybe support for both in some capacity might make sense? People do love to create categories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants