Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is destructering in mixin intended / supported for foreseeable future? #2083

Closed
StephenCarboni opened this issue Feb 6, 2019 · 2 comments
Closed
Labels

Comments

@StephenCarboni
Copy link

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?

@elextr
Copy link
Member

elextr commented Feb 6, 2019

This is the forum for the Geany IDE, not any specific programming language. You should ask on teh appropriate forum for the language you are using.

@elextr elextr added the invalid label Feb 6, 2019
@StephenCarboni
Copy link
Author

StephenCarboni commented Feb 6, 2019

Sorry, brain fart, you may delete this issue.

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

No branches or pull requests

2 participants