formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Components wrapped inside a fragment do not have Dividers #226

Closed petewins closed 3 months ago

petewins commented 3 months ago

Describe the bug Components wrapped inside a fragment do not have Dividers inside a View. Not sure if this is the intended behavior given how the Fragment wrapper is initially counted as one component but I noticed this behavior when I had a Fragment with dynamic number of children

To Reproduce https://codesandbox.io/p/devbox/reshaped-view-divider-demo-8sprjr?file=%2Fapp%2Fpage.tsx%3A12%2C1

Expected behavior Expect Children of the View to have dividers, including Child components with fragments

Screenshots If applicable, add screenshots to help explain your problem.

image image

Environment (please complete the following information):

Additional context Add any other context about the problem here.

blvdmitry commented 3 months ago

Should be fixed in 2.10.5

<View direction="row" gap={4} divided>
    <Placeholder>Item 1</Placeholder>
    <>
        <Placeholder>Item 2</Placeholder>
        <Placeholder>Item 3</Placeholder>
    </>
</View>

Image

petewins commented 3 months ago

Thank you 💛