Wes Rice
wesrice.com
Wes Rice
@wesrice.com
UX focused frontend engineer. He/Him.
April 1, 2025 at 3:26 PM
To piggy back on this approach, you could have a discriminated union that had the variant plus a “render” callback function that has an input of the component type and returns JSX.Element.

This would allow for defining the props whenever the component is used instead of statically in a map.
February 20, 2025 at 6:47 AM