Im trying to extend my component props conditionally depending on if a particular prop is passed.
My aim is to extend props by attributes of an anchor if a href prop is passed, and extend by attributes of a button if not.
Is this even possible?

<Button<Anchor> ...></Button>and then update the definitionexport const Button<T> = (p: Props<T>). The type definition would just extend thentype Props<T> = {...} & T