-
Notifications
You must be signed in to change notification settings - Fork 170
Fully dynamic attributes #452
Copy link
Copy link
Open
Labels
context aware escapingThis feature depends on Maud treating certain elements and attributes in a special wayThis feature depends on Maud treating certain elements and attributes in a special way
Metadata
Metadata
Assignees
Labels
context aware escapingThis feature depends on Maud treating certain elements and attributes in a special wayThis feature depends on Maud treating certain elements and attributes in a special way
#444 from @BadMannersXYZ got me thinking. I currently use maud like JSX, in that I define components like this:
In React-land, I'd write:
Now my problem is that I'd like to add custom classes and attributes to my "component" from the caller side.
<form class="foobar">for example. In JSX, I'd write:And the MyCustomForm would forward all props to the underlying form element.
How about this API in Rust?
maud could expose alternative ways to construct
maud::Attributesas well, and solve usecases related to #444 as well in one go.