ember-freestyle
ember-freestyle copied to clipboard
Simplify freestyle-usage component slugs
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) - [x] 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.
I'm thinking we should have a display
property that defaults to 'toggle'
but can be set to 'none'
or 'off'
... something like that.
display: none
would be how my brain works
what about using the component's built in isVisible
property?
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.