fix(deps): update dependency @material/web to v1
This CL also fixes many things necessary for the update.
It also changes the entire md3 theme, since there have been a lot of
breaking changes and this is the easiest way to have a working theme
again (it is also an improvement).
Change-Id: I4a412e0c0ca4345084c724fcaba000293521e907
diff --git a/src/contentScripts/communityConsole/threadToolbar/components/index.js b/src/contentScripts/communityConsole/threadToolbar/components/index.js
index bbaa20d..8e1bcd9 100644
--- a/src/contentScripts/communityConsole/threadToolbar/components/index.js
+++ b/src/contentScripts/communityConsole/threadToolbar/components/index.js
@@ -1,6 +1,6 @@
-import '@material/web/formfield/formfield.js';
import '@material/web/icon/icon.js';
import '@material/web/switch/switch.js';
+import '../../../../common/components/FormField.js';
import consoleCommonStyles from '!!raw-loader!../../../../static/css/common/console.css';
import {msg} from '@lit/localize';
@@ -70,11 +70,15 @@
'Label for the switch which lets users enable/disable the nested view in a thread.',
});
return html`
- <md-formfield label="${nestedViewMsg}">
+ <twpt-form-field>
<md-switch ${ref(this.nestedViewRef)}
?selected=${!this.options?.flattenthreads_switch_enabled}
- @click=${this._flattenThreadsChanged}>
- </md-formfield>
+ @change=${this._flattenThreadsChanged}>
+ </md-switch>
+ <span slot="label">
+ ${nestedViewMsg}
+ </span>
+ </twpt-form-field>
`;
}