-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CrOverrides]: Migrate existing overrides to Lit
- Loading branch information
1 parent
69c80cd
commit 964e9fd
Showing
7 changed files
with
81 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
ui/webui/resources/cr_elements/cr_button/cr_button.html.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { html } from '//resources/lit/v3_0/lit.rollup.js'; | ||
import type { CrButtonElement } from './cr_button.js'; | ||
|
||
export function getHtml(this: CrButtonElement) { | ||
return html` | ||
<leo-button id="button" kind="outline" size="small"> | ||
<slot slot="icon-before" name="prefix-icon"></slot> | ||
<slot></slot> | ||
<slot slot="icon-after" name="suffix-icon"></slot> | ||
</leo-button>`; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import { html } from '//resources/lit/v3_0/lit.rollup.js'; | ||
import type { CrToggleElement } from './cr_toggle.js'; | ||
|
||
export function getHtml(this: CrToggleElement) { | ||
return html` | ||
<leo-toggle id="toggle" size="small" ?checked="${this.checked}" ?disabled="${this.disabled}" @change="${this.onChange_}"> | ||
<slot></slot> | ||
</leo-toggle> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters