-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[personalization] Add SVG to dynamic color buttons
Replace the placeholder svg with the actual SVG. BUG=b:254481177 TEST=https://screenshot.googleplex.com/AjEbothEbDRZUdA Change-Id: I564464806984220e256567fbf8a6daf6ba516e7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999811 Reviewed-by: Jeffrey Young <cowmoo@chromium.org> Commit-Queue: Erica Lee <ericamlee@google.com> Cr-Commit-Position: refs/heads/main@{#1067353}
- Loading branch information
Erica Lee
authored and
Chromium LUCI CQ
committed
Nov 4, 2022
1 parent
e786293
commit b56eb46
Showing
6 changed files
with
82 additions
and
12 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 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
5 changes: 5 additions & 0 deletions
5
ash/webui/personalization_app/resources/js/theme/color_scheme_icon_svg_element.html
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,5 @@ | ||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"> | ||
<path fill$="[[scheme.primaryColor]]" d="M0.000120163 24C0.000120742 10.7452 10.7453 -2.48674e-06 24.0001 -1.90735e-06C37.255 -1.32796e-06 48.0001 10.7452 48.0001 24L0.000120163 24Z"/> | ||
<path fill$="[[scheme.secondaryColor]]" d="M24 48C37.2548 48 48.0001 37.2548 48.0001 24L24 24L24 48Z"/> | ||
<path fill$="[[scheme.tertiaryColor]]" d="M0.000120163 24C0.000118997 37.3335 10.7451 48 24 48L24 24L0.000120163 24Z"/> | ||
</svg> |
34 changes: 34 additions & 0 deletions
34
ash/webui/personalization_app/resources/js/theme/color_scheme_icon_svg_element.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,34 @@ | ||
// Copyright 2022 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview This component is for the color scheme icon svg. | ||
*/ | ||
|
||
import {WithPersonalizationStore} from '../personalization_store.js'; | ||
|
||
import {getTemplate} from './color_scheme_icon_svg_element.html.js'; | ||
import {DynamicColorScheme} from './dynamic_color_element.js'; | ||
|
||
export class ColorSchemeIconSvgElement extends WithPersonalizationStore { | ||
static get is() { | ||
return 'color-scheme-icon-svg'; | ||
} | ||
|
||
static get template() { | ||
return getTemplate(); | ||
} | ||
|
||
static get properties() { | ||
return { | ||
scheme_: { | ||
type: Object, | ||
readOnly: true, | ||
}, | ||
}; | ||
} | ||
private scheme_: DynamicColorScheme; | ||
} | ||
|
||
customElements.define(ColorSchemeIconSvgElement.is, ColorSchemeIconSvgElement); |
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 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