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

Fragments inside Inline is not flattened #1053

Open
bjoerge opened this issue Jan 25, 2023 · 0 comments
Open

Fragments inside Inline is not flattened #1053

bjoerge opened this issue Jan 25, 2023 · 0 comments

Comments

@bjoerge
Copy link
Member

bjoerge commented Jan 25, 2023

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.

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

No branches or pull requests

1 participant