i need to override the default blue (primary color) on Antd Switch Component when checked and change it to red color. is there a way i can do this?
i have tried using style attribute but it didnt work.
You can change the backgroundColor using inline styles like this.
<Switch style={{backgroundColor: permission.enabled ? 'green' : 'orange'}}
checked={permission.enabled}
checkedChildren={'ENABLED'}
unCheckedChildren={'DISABLED'}
onChange={(e) => onPermissionChanged(e, permission)} />