artsy / fresnel

An SSR compatible approach to CSS media query based responsive layouts for React.
https://artsy.github.io/blog/2019/05/24/server-rendering-responsively
Other
1.25k stars 65 forks source link

Prop to override container element #220

Closed Meemaw closed 2 years ago

Meemaw commented 2 years ago

Hi 👋

We would like to override the underlying container element that the Media component renders, e.g. container="section" or even container={MyComponent}. Relevant code: https://github.com/artsy/fresnel/blob/master/src/Media.tsx#L478

Would you be open to this change? If so, I can prepare a PR.

damassi commented 2 years ago

Note that we have a renderProps API that supports that here, but we'd be willing to accept a PR that accepts a component as a prop, in which case we can open this issue back up.