-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add support for pattern variants #87
Comments
Will also add some notes from @nmorduch in #11 about this, which seems related: An established setup for situations where our pattern templates don't show everything
this could possibly be accomplished with some combination of:
contexts:
display: switcher
- name: No introduction
context:
page:
title: Page Title
- name: Short intro
context:
page:
title: Page Title
introduction: Introduction to page
- name: Long intro
context:
page:
title: Page Title
introduction: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque laoreet ante ac sapien eleifend tincidunt id ac diam. contexts:
display: overview
- name: .button
template: button.html
context:
label: Default button
- name: .button--alt
template: button.html
context:
label: Alt button
classes: button--alt
- name: .button--large
template: button-large.html
context:
label: Large button |
Mentioned in the docs as of #131, with workaround. |
@thibaudcolas wrote
Sorry, but what workaround is this? I went to #131 but I am none the wiser. |
@simkimsia here are the docs that cover this: https://torchbox.github.io/django-pattern-library/guides/multiple-variants/ |
Extracted from #28.
The text was updated successfully, but these errors were encountered: