ContainerChild
The ContainerChild
component is the only child allowed within a Container in Magento PWA theme.
This component is responsible for rendering content.
Props
Name | Required | Description |
---|---|---|
id |
check_box | A unique string identifier |
render |
check_box | A render prop that should return the children to render |
Example
import { ContainerChild } from '@magento/peregrine';
<div data-mid="some.container.identifier">
<ContainerChild
id="another.unique.id"
render={() => <div>Used just like a normal render() method</div>}
/>
<ContainerChild
id="one.more.unique.id"
render={() => (
<div>Can render anything a normal component can render</div>
)}
/>
</div>;