Skip to content

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

Open
@bytrangle

Description

@bytrangle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions