I want to create a type for a map of enum keys to React FCs as mentioned in the code snippet below. The type should have enum keys associated to a particular component and its corresponding props. I tried a couple other methods but nothing works because the prop types for each component as also different in shape and value.
Here is the sample playground link for this case
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.