Skip to content

SortableList item margin has $backgroundDefault color? #2538

Answered by lidord-wix
YuyouWu asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @YuyouWu,
I tried to change this color to 'transparent' and it causing some bugs:

  1. You can see here that the items are transparent when they overlap:

    instead of:
  2. The elevation on Android adds a shadow effect to make the element elevated ("closer" to the user).
    Android-transparent.webm
    instead of:
    Android-non-transparent.webm

Anyway, I found a solution for that with a new prop called itemMargins, please see #2561 and check it with your case.
You can pass the prop directly to the SortableList component, for example:

<SortableList
  ...
  itemMargins={{marginBottom: 20, marginLeft: 10, marginRight: 10}}
/>

You can also install react-native-ui-lib@7.3.0-snapshot.2948 to check that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YuyouWu
Comment options

Answer selected by lidord-wix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants