bug(MatSlideToggle): MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS doesn't provide ability to set default color
Reproduction
There is no way to set default color for MatSlideToggle component at application level.
Expected Behavior
It would be great to have ability to set default color in the same way as it is implemented for MatCheckBox or MatRadioButton:
providers: [
{ provide: MAT_CHECKBOX_DEFAULT_OPTIONS, useValue: { color: 'primary' } },
{ provide: MAT_RADIO_DEFAULT_OPTIONS, useValue: { color: 'primary' } },
],
Actual Behavior
MatSlideToggleDefaultOptions has no color property. 'accent' value is hardcoded, please checkout slide-toggle.ts#75
https://github.com/angular/components/blob/5b30c4cfc8892031445895d2aa1660f72663bc77/src/material/slide-toggle/slide-toggle.ts#L75
Environment
- CDK/Material: ^11.2.0
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.