Skip to content

Fragments inside Inline is not flattened #1053

@bjoerge

Description

@bjoerge

When using fragments inside an Inline component, an intermediate div is created for each fragment

<Inline space={2}>
  <>
    <Text>one</Text>
    <Text>two</Text>
  </>
  <>
    <Text>three</Text>
    <Text>four</Text>
  </>
</Inline>

Will render:
image

While I'd expect it to render:
image

Repro: https://www.sanity.io/ui/arcade?mode=jsx&jsx=eJyz8czLycxLteNSULABEUAqJLWixC4%2FL9VGH8xCEiwpz0cI2uhjaCrJKErFoi0tv7QIVZ%2BNPsxaAOt7I7A%3D&title=Inline+example&description=A+basic+example+of+using+the+Inline+primitive+in+Sanity+UI.

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