Skip to content

Commit

Permalink
Migrate Icon Button
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Feb 11, 2024
1 parent 7fb24ba commit 6ce2c78
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
15 changes: 15 additions & 0 deletions src/components/ew-icon-button.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
import { styles as sharedStyles } from "@material/web/iconbutton/internal/shared-styles.css.js";
import { styles } from "@material/web/iconbutton/internal/standard-styles.css.js";

declare global {
interface HTMLElementTagNameMap {
"ew-icon-button": EwIconButton;
}
}

export class EwIconButton extends IconButton {
static override styles = [sharedStyles, styles];
}

customElements.define("ew-icon-button", EwIconButton);
14 changes: 0 additions & 14 deletions src/components/ewt-icon-button.ts

This file was deleted.

12 changes: 6 additions & 6 deletions src/install-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./components/ewt-checkbox";
import "./components/ewt-console";
import "./components/ewt-dialog";
import "./components/ewt-formfield";
import "./components/ewt-icon-button";
import "./components/ew-icon-button";
import "./components/ewt-textfield";
import type { EwtTextfield } from "./components/ewt-textfield";
import "./components/ewt-select";
Expand Down Expand Up @@ -134,9 +134,9 @@ export class EwtInstallDialog extends LitElement {
>
${heading && allowClosing
? html`
<ewt-icon-button dialogAction="close">
<ew-icon-button dialogAction="close">
${closeIcon}
</ewt-icon-button>
</ew-icon-button>
`
: ""}
${content!}
Expand Down Expand Up @@ -476,9 +476,9 @@ export class EwtInstallDialog extends LitElement {
Join other…
</ewt-list-item>
</ewt-select>
<ewt-icon-button @click=${this._updateSsids}>
<ew-icon-button @click=${this._updateSsids}>
${refreshIcon}
</ewt-icon-button>
</ew-icon-button>
`
: ""}
${
Expand Down Expand Up @@ -975,7 +975,7 @@ export class EwtInstallDialog extends LitElement {
:host {
--mdc-dialog-max-width: 390px;
}
ewt-icon-button {
ew-icon-button {
position: absolute;
right: 4px;
top: 10px;
Expand Down

0 comments on commit 6ce2c78

Please sign in to comment.