Is there a way to enforce children of a particular component type?
I'm wanting to make a component that only accepts children that are a specific component so for example:
I tried playing around with
So as a prop,
I tried playing around with
FlowProps and FlowComponent but couldn't quite get it to work. I think I'm pretty close but I'm not sure how I can allow passing the result of calling <Code /> while also enforcing the children are of type Code.So as a prop,
items: (typeof Code)[] for example allows me pass in Code but not <Code />.