Compound React Components with Hooks and TypeScript