Closed Hardtack closed 7 years ago
This can be fixed by breaking change of wrapper API.
We wanted to provide customization capability of HTML element actually rendered.
So I made PropWrapper
.
type Wrappable<P> = ReactComponent<P> | React.Element<P>;
type Props<P: {}> = {
wrap: Wrappable<P>
} & P;
It works with basic wrapping with fancy props API like this
<Themed wrap={<a />} href="/link" backgroundColor="accent">Themed Link</Themed>
But it's too complex and can cause unexpected property collisions.
I'm considering to change it like:
<Themed wrap={<a href="link" />} backgroundColor="accent">Themed Link</Themed>
Key point is Splitting @react-mdc
component's props and wrapped component's props
<Themed wrap={<a href="link" />} backgroundColor="accent">Themed Link</Themed>
This style is too inconvenient. I'm trying to fix it with original API
Fixed