How to render a React component styled with Emotion in an iframe in Gatsby site?

I work on a component library and a demo site.

Components are styled using Emotion and the demo site is built with Gatsby.

For preview purposes, I’d like to render components in an iframe. This will ensure that styles from the website are not cascading to the components, make it easier to deal with responsive layouts, etc.

Here, you can see an example of how line-height from the website is cascading to the Button component causing it to be very tall.

enter image description here

How could I render the Button with all its styles inside the iframe?

Source: ReactJs