-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
The current Switch component allows you to customize:
trackColor: just the background, depending on 'false' or 'true' valuesthumbColor: if you need to change it depending on the same values allowed for the trackColor you need to create a local state to track if it's true or false (enabled or disabled)
The issue is that:
- There is no consistent way to define colors for true and false values, you need to add extra logic for the thumbColor
- The only thing you can customize is the background color, there is no option if you want to display just a border when the value is false to match a minimal design. You need to do a workaround if you want to add a custom border also depending on the value.