Skip to content

How do I render block children with custom containers? #742

@toddpadwick

Description

@toddpadwick

I have a sanity Block content field that contains:

  • General text styling
  • Gallery component
  • banner component
  • video component

I would like to wrap chunks of block text in a different container tag to the other components so that I can apply styling to it that doesn't effect the components. such as max widths, or wrapping in a box or similar.
How can I specify a container tag for specific children of the block serialiser?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions