This small module will help integrating patternlab with drupal backend. Instead of declaring a custom theme-hook ad including a patternlab-pattern into your custom template you can call
$render_array = pattern('atoms', 'button', ['label' => 'hello world']);
- Install the module as usual
- Copy the
patternlab-pattern.tpl.twig
into your twig-based theme.
To render a pattern, just use the pattern
-helper-function:
$render_array = pattern('atoms', 'button', ['label' => 'hello world']);