I encountered an issue with the react-popup component I am using. When I add an image to the popup, it stretches to full width and length. How can I resize the image?
export default () => (
<Popup
trigger={<Button className="button" variant="contained" color="primary" > Click me! </Button>}
modal
nested
>
{(close: any) => (
<div className="modal">
<button className="close" onClick={close}>
×
</button>
<div className="header"> Heading</div>
<div className="content">
{' '}
<div className="car">
<img src={car} alt="car" />
</div>
<br />
<br />
Text
</div>
</div>
)}
</Popup>
);
Style:
.car {
width: 10;
}
When attempting to create a sandbox for testing, I received a material UI error: https://codesandbox.io/s/bold-hooks-yhik1?file=/src/Popup.tsx
The modal will open upon clicking the button.