Closed jigarius closed 5 years ago
I think I've figured out what they do. I've shared my findings on https://jigarius.com/blog/drupal-ui-patterns. From what I understand, they provide:
variant
in the TWIG template to allow the user to modify it accordingly.
I've been using UI Patterns for 3 projects now and I was wondering what "variants" actually do?
My understanding
twig
files.twig
file for a pattern, but one can create atwig
file with a specific naming-convention to make UI Patterns discover it and use it.My expectation
Example
without_icon
andwith_icon
.with_icon
, I want to include 1 extra field namedicon_class
.without_icon
should not have any icon Buttonwith_icon
should have an iconIt will be great if you could document what the
variants
do and how to use them. I couldn't find proper documentation on them anywhere.