MCPcopy Create free account
hub / github.com/angular/components / toggleM3

Method toggleM3

src/dev-app/dev-app/dev-app-layout.ts:222–231  ·  view source on GitHub ↗
(value = !this.state.m3Enabled)

Source from the content-addressed store, hash-verified

220 }
221
222 toggleM3(value = !this.state.m3Enabled) {
223 // We need to diff this one since it's a bit more expensive to toggle.
224 if (value !== this.state.m3Enabled) {
225 (document.getElementById('theme-styles') as HTMLLinkElement).href = value
226 ? 'theme-m3.css'
227 : 'theme.css';
228 }
229 this.state.m3Enabled = value;
230 setAppState(this.state);
231 }
232
233 toggleColorApiBackCompat(value = !this.state.colorApiBackCompat) {
234 this.state.colorApiBackCompat = value;

Callers 1

constructorMethod · 0.95

Calls 1

setAppStateFunction · 0.90

Tested by

no test coverage detected