Hi! I'm trying to create a function React component that uses dot notation using the following:
type BodyComponent = React.FunctionComponent;
type ModalComponent = React.FunctionComponent & {
Body: BodyComponent;
}
const Modal: ModalComponent = ({children}): JSX.Element => (<dialog>{children}</dialog>);
const Body: BodyComponent = ({children}): JSX.Element => (<p>{children}</p>);
Modal.Body = Body;
However, I'm getting the array on both components that reads, Property 'children' does not exist on type '{}'. and I don't know hot to fix it