Skip to content

Switch disabled track and thumb color #1758

Closed

Description

@reck753

Is your feature request related to a problem? Please describe.
No.

Describe a solution you'd like
I saw that the disabled colors are hard-coded so I would only change them with variables passed from props. Eg. I would add two more props disabledTrackColor and disabledThumbColor. I feel like that styling should be adjustable, because not everyone is happy with those colors.

Describe alternatives you've considered

Additional context
Eg. I have a switch with red track and white thumb and I would like it to have some light red color for track and some light grey color for thumb when disabled, instead of those that are hard-coded.

Activity

  1. Repository owner deleted a comment from MoeKanan on Jul 6, 2021
  2. Repository owner deleted a comment from bouaoud on Jul 6, 2021
  3. makkarMeenu commented on Nov 9, 2021

    @makkarMeenu
    Contributor

    @reck753 This PR resolves the above issue in a different way.
    You can change trackColor and thumbColor conditionally according to disabled condition.
    I think, we can't introduce new props as react-native also doesn't provide disabledTrackColor and disabledThumbColor.

  4. reck753 commented on Nov 9, 2021

    @reck753
    Author

    @reck753 This PR resolves the above issue in a different way. You can change trackColor and thumbColor conditionally according to disabled condition. I think, we can't introduce new props as react-native also doesn't provide disabledTrackColor and disabledThumbColor.

    Hi, @makkarMeenu!
    Thanks for the PR! This would be a good enough solution for me.

  5. added this to the 0.17.x milestone on Feb 7, 2022
  6. added a commit that references this issue on Sep 13, 2022
    48842ca
  7. added a commit that references this issue on Feb 22, 2024
    944b45c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions