I have this embed theme-ui component and it's height doesn't works. In the console appears ok, but it displays with 100%;
<Embed src={url} sx={{width: '800px', height: '400px'}}/>
The embed is inside a modal of 100vw for 100vh
Thanks
I have this embed theme-ui component and it's height doesn't works. In the console appears ok, but it displays with 100%;
<Embed src={url} sx={{width: '800px', height: '400px'}}/>
The embed is inside a modal of 100vw for 100vh
Thanks
Copyright © 2021 Jogjafile Inc.
I've been testing with this component, and there is no problem when I define a specific size.
Be sure that you're putting in your code
/** @jsx jsx */and after that declare jsx, like thisimport { jsx } from "theme-ui";And try to use the lastest version, in the example I'm using 0.3.1 for theme-ui
UPDATE
Digging deeper, I think it's necessary create your own component where you can define an iframe because Embed component doesn't allow you change some css properties directly.
Theme-ui allows you create an iframe using Box component setting the a prop like this:
<Box as="iframe" .../>OwnEmbed.js
The implementation it's same as Embed component
Main.js
If you highlight the element in the browser you'll see the correct size.
Take a look at this: Change size Embed from theme-ui