In trying to give named parameters to mixins, I noticed you can get away doing this:
mixin simpleField({label, name, isRequired, leftIconClass})
.field
label.label(for=`txt-${name}`)= label
div(class=`control ${leftIconClass ? "has-icons-left" : ""}`)
input.input(
id=`txt-${name}`,
name= name,
type='text',
required= isRequired)
if leftIconClass
span.icon.is-small.is-left
i.fas(class= leftIconClass)
+simpleField({ label: "Full Name", name: "host-full-name", isRequired: true, leftIconClass: "fa-user" })
Is there a good chance this is going to break in the future?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.