Closed JayaKrishnaNamburu closed 3 months ago
Implement named-slot for next and html generators to pass jsx to components.
named-slot
next
html
{ "type": "element", "content": { "elementType": "component", "dependency": { "type": "local" }, "referencedStyles": {}, "abilities": {}, "children": [], "attrs": { "heading": { "type": "element", "content": { "elementType": "container", "style": { "padding": "20px" }, "children": ["This is amazing"] } } }, "semanticType": "Hero" } }
Declaration of the prop is
{ "heading": { "defaultValue": "Magnificent things are very simple", "type": "element" } }
This will help in creating jsx that can pass jsx as a prop to the component
jsx
<Hero heading={<div>This is amazing</div>}></Hero>
const Hero = () => { return <div className="hero-text">{props.heading}</div> }
Related to #897
Implement
named-slot
fornext
andhtml
generators to pass jsx to components.Declaration of the prop is
This will help in creating jsx that can pass
jsx
as a prop to the component