splitbee / react-notion

A fast React renderer for Notion pages
https://react-notion.com
MIT License
2.85k stars 149 forks source link

Images are overflowing #77

Closed YeonjuSeo closed 2 years ago

YeonjuSeo commented 3 years ago

I'm trying to render one notion page. Font size is fine but the images are getting bigger than the wrapper and the layout isn't working properly. I don't know what to do Plz help me.

This is the notion page: image

And this is the react-notion page: 스크린샷 2021-08-04 19 08 36
image

This is my code:

<StyledNotionWrapper>
{isNotionContent && <NotionRenderer blockMap={notionData} />}
</StyledNotionWrapper>

const StyledNotionWrapper = styled.div`
    width: 792px;
    max-width: 792px;
    font-size: 0.2rem;
`;
dimitrisraptis96 commented 3 years ago

These CSS classes fixed the issue for me @YeonjuSeo :

.notion,
.notion img,
.notion-asset-wrapper {
  max-width: 100%;
}
.notion-asset-wrapper > div {
  padding-bottom: 0 !important;
}
YeonjuSeo commented 3 years ago

Oh god Thank you so much!! It worked for me!!