Skip to content

Change background color as needed #184

@giulianok

Description

@giulianok

Is your feature request related to a problem? Please describe.
The item has a fixed color (white) that can only be customizable by providing custom styles or by overriding the item class. See https://github.com/sandstreamdev/react-swipeable-list/blob/master/src/SwipeableListItem.css#L15. The problem comes when the list is needed in different colors.

Describe the solution you'd like
Add an optional className prop to SwipeableListItem to let the user makes any overrides needed.

Describe alternatives you've considered

  • Add an optional bgColor prop to SwipeableListItem to let the user customize it.
  • Use CSS variables to let the user customize it via CSS. This only adds some flexibility but does not help to fix the issue of using the list with different bg colors.

Additional context
N/A


Note: Happy to open a PR with a solution after discussing the options

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