const MyComponent = () => {
return <div style="color: blue;" class="some-thing" attr:id="another-thing">
Hello world!
</div>
}
const my_green_component = <MyComponent style="color: green;" attr:id="a-different-thing" />
// this will create:
// <div style="color: green;" id="a-different-thing" class="some-thing">Hello World!</div>
Generated using TypeDoc
when explicitly declaring a prop to be of an attribute kind, use the
attr:prefix to specify.examples:
attr:id,attr:style,attr:class, andattr:href.common values for the
QualifiedAttributeNamestype parameter:note that using a union of string literal attributes instead of just using any arbitrary string attribute, will lead to slowdowns in you IDE.