Skip to content

How to declare additional attribute for a partial? #3419

@ceremcem

Description

@ceremcem

Is there a known way to declare additional attributes for a partial? For example:

{{#partial mybutton}}
  <mycomponent foo="{{value}}" bar="{{size}}"  color="green" hello="there" /> 
  <!-- mycomponent also supports width= attribute -->
{{/partial}}

{{#with myvar1}}
  {{> mybutton}}
{{/with}}

{{#with myvar2}}
  {{> mybutton width="300"}} <- this syntax would be pretty handy
{{/with}}

I simply want to use mycomponent with some default configuration and then I want to extend it with a new attribute only for the next instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions