-
Notifications
You must be signed in to change notification settings - Fork 3
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
Overriding pattern HTML previews #84
Comments
@tylersticka Is the desire to be able to use customized (truncated, simplified, etc.) HTML for the code example? |
@erikjung Yes! I imagine there are probably like fourteen ways of accomplishing that. But for some reason this idea just popped in my head and I figured I'd document it. |
@tylersticka How about this approach: # pattern.hbs
name: Neat Component
notes: ...
example: |
<div class="NeatComponent">
...
</div> And then the helper can check for the presence of |
@erikjung I'd be fine with either direction, honestly. I'd say I'll probably only use it maybe 5% of the time. So repeating some source in the YAML is not a concern. |
@tylersticka I imagine use cases where the inner contents of the HTML are needed to present an understandable visual, but noisy to include in the code itself. For example: http://getbootstrap.com/components/#panels-alternatives |
@erikjung Yep, that example is spot-on. |
This idea just came to me and it may be a terrible one.
But if our
patternSource
helper included some bit of data (isSource: true
) or whatever, we could theoretically do this with our patterns:Not high priority, just something to think about! ¯_(ツ)_/¯
The text was updated successfully, but these errors were encountered: