sycamore
sycamore copied to clipboard
Allow adding derives to generated prop type for `inline_props`
Sometimes, the generated prop type needs to implement additional traits which can be derived using a derive macro. This arises in, e.g. mdsycx where the props type needs to derive FromMd so that the component can be used from Markdown.
Currently, we cannot use inline_props in this case because we have no way of specifying addition derives on the generated prop type.
Proposal
Allow #[component(inline_props, derive(FromMd))] which adds a #[derive(FromMd)] onto the generated type.
Possibly even allow arbitrary attributes to be passed in in the same position which would forward them onto the generated type.