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

Simplify freestyle-usage component slugs #37

Open
1 of 5 tasks
chrisvdp opened this issue Apr 22, 2016 · 4 comments
Open
1 of 5 tasks

Simplify freestyle-usage component slugs #37

chrisvdp opened this issue Apr 22, 2016 · 4 comments

Comments

@chrisvdp
Copy link
Contributor

chrisvdp commented Apr 22, 2016

Goals

  • Simplify freestyle-usage slugs
  • Provide better control for component usage snippets

To Do

  • Make freestyle-usage slugs optional
  • Document how adding a slug to a freestyle-usage component enables the focus feature
  • Document how adding a slug to a freestyle-usage component results in a usage snippet in the style guide (and provide a component property to disable this)
  • Warn if duplicate slugs are detected
  • Document how usage snippets work

Use Case

I want to render code, but not the snippet in some cases as it doesn’t add much to the styleguide. ie Headings, Typography, Color Palette.

@chrislopresto chrislopresto changed the title Allow usage tag to disable code snippet Allow freestyle-usage component to disable code snippet Apr 22, 2016
@chrislopresto
Copy link
Owner

I'm thinking we should have a display property that defaults to 'toggle' but can be set to 'none' or 'off'... something like that.

@chrisvdp
Copy link
Contributor Author

display: none would be how my brain works

@chrislopresto chrislopresto changed the title Allow freestyle-usage component to disable code snippet Simplify freestyle-usage component slugs May 3, 2016
@grapho
Copy link

grapho commented May 3, 2016

what about using the component's built in isVisible property?

@chrislopresto
Copy link
Owner

The idea here is to provide a way to opt out of the automatic usage snippet. For example, we never want to see the usage snippets for things like the freestyle-palette component.

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

3 participants