Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Adding multiple classes via styleModifier not working #392

Closed
mawrhis opened this issue Aug 4, 2017 · 1 comment
Closed

Adding multiple classes via styleModifier not working #392

mawrhis opened this issue Aug 4, 2017 · 1 comment

Comments

@mawrhis
Copy link

mawrhis commented Aug 4, 2017

I've been trying to pass multiple classes to my pattern using default patternlab syntax:

{{> patternType-pattern:class1|class2 }}

and for pattern:
<div class="{{styleModifier}}"></div>

But only the class1 is being passed through. It does seem to work, when the pipe is left out and replaced with space like this:

{{> patternType-pattern:class1 class2 }}
but it only works for styleModifiers. It's impossible to pass other pattern parameters, like:
{{> patternType-pattern:class1(message: "btn2") class2 }}

I've tried to disable data inheritance plugin, but it didn't affect the behavior. There's no other thing that I'm aware of that might affect it, so it seems like a bug.

any ideas where the problem could be?

@bradfrost
Copy link
Member

@mawrhis Thanks for your question.

I tend to workaround this issue like so:

{{> atoms-button(styleModifier: "btn--secondary btn--small") }}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants