Answer the question
In order to leave comments, you need to log in
How to implement multiple blocks in mixin - pug?
There is such a mixin for a button
- var blocks={};
mixin set(key)
- blocks[key] = this.block
mixin A(buttonClass, buttonText, disabled)
button.button(class= buttonClass, disabled= disabled)
span
if block
block
- blocks.left()
| #{buttonText}
- blocks.right()
else
| #{buttonText}
+A("button_small button_filled", "Кнопка", false)
+set('left')
p l
+set('right')
p r
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question