Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the purpose of bodyClassName prop in NotionRenderer when fullPage is false? #316

Open
bytrangle opened this issue Jun 30, 2022 · 0 comments · May be fixed by #322
Open

What's the purpose of bodyClassName prop in NotionRenderer when fullPage is false? #316

bytrangle opened this issue Jun 30, 2022 · 0 comments · May be fixed by #322

Comments

@bytrangle
Copy link
Contributor

bytrangle commented Jun 30, 2022

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">.`

classname-vs-bodyclassname-fullpage-false

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.

@bytrangle bytrangle linked a pull request Jul 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant