react-notion-x
react-notion-x copied to clipboard
What's the purpose of `bodyClassName` prop in NotionRenderer when fullPage is false?
https://github.com/NotionX/react-notion-x/blob/015c6816c0d63743e1b57272373457022daacba5/packages/react-notion-x/src/block.tsx#L254
According to the source code, when fullPage prop of NotionRenderer is set to false or left out, both the values of prop className and bodyClassName are added to the wrapper for Notion content.
Example code:
<NotionRenderer
className='classname'
bodyClassName='body-class-name'
/>
will be translated to this markup:
`<main class="notion-page class-name body-class-name">.`

I can't think of a scenario where this would be useful. Can @transitive-bullshit or anyone else familiar with NotionRenderer give a useful example?
UPDATE
On further research, I think Notion children blocks, rendered to html as <div class="notion-text notion-block-xyz"> should be wrapped inside another <div>.
There are cases when we're only interested in the block content of a page, and providing a middleman layer inside notion-app and but outside above notion-text can help with styling.