Hi all
I created a following component:
let component = ReasonReact.statelessComponent("NavLinkView");
let make = (~text: string, ~href: string, _children) => {
...component,
render: (_self) => {
<li className="nav-item">
<a className="nav-link" href={href}>
<i className="fa fa-fw fa-dashboard"></i>
<span className="nav-link-text">{ReasonReact.string(text)}</span>
</a>
</li>
}
};
then this component should be a child of the following component:
let component = ReasonReact.statelessComponent("NavItemView");
let make = (children: NavLinkView) => {
...component,
render: _self => {
<div className="nav-item">
</div>
}
};
I want to constraint, that the component NavItemView
only accepts the component NavLinkView
. Is it possible?
Thanks