Skip to content

[TwigComponent] props reflexion #1387

Closed
@WebMamba

Description

@WebMamba

Hey! I want your though before to start working on something.
Today if you have a TwigComponent

#[AsTwigComponent]
class Button
{
...
}
{% props label %}

<button>
{{  label }}
</button>

The props label defined in the template will not be taken in to account because the Button component is not an anonymous component.
What do you think about letting the ability to merge props defined into the template with props defined in the class.
If a conflict happen raise an error.
WDYT?

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