mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-12 17:45:49 +08:00
Add a new web-component to simplify adding new/working with icons in DevTools Bug: chromium:1126031 Change-Id: I37462cad34dae443ea2949fc8f736aa1614b3aa8 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2401167 Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
/**
|
|
* WARNING: do not modify this file by hand!
|
|
* it was automatically generated by the bridge generator
|
|
* if you made changes to the source code and need to update this file, run:
|
|
* npm run generate-bridge-file front_end/elements/Icon.ts
|
|
*/
|
|
|
|
import './Icon.js';
|
|
/**
|
|
* @typedef {IconWithPath|IconWithName}
|
|
*/
|
|
// @ts-ignore we export this for Closure not TS
|
|
export let IconData;
|
|
/**
|
|
* @typedef {{
|
|
* iconPath:string,
|
|
* color:string,
|
|
* width:(string|undefined),
|
|
* height:(string|undefined),
|
|
* }}
|
|
*/
|
|
// @ts-ignore we export this for Closure not TS
|
|
export let IconWithPath;
|
|
/**
|
|
* @typedef {{
|
|
* iconName:string,
|
|
* color:string,
|
|
* width:(string|undefined),
|
|
* height:(string|undefined),
|
|
* }}
|
|
*/
|
|
// @ts-ignore we export this for Closure not TS
|
|
export let IconWithName;
|
|
// eslint-disable-next-line no-unused-vars
|
|
export class IconClosureInterface extends HTMLElement {
|
|
/**
|
|
* @return {!IconData}
|
|
*/
|
|
get data() {
|
|
throw new Error('Not implemented in _bridge.js');
|
|
}
|
|
/**
|
|
* @param {!IconData} data
|
|
*/
|
|
set data(data) {
|
|
}
|
|
}
|
|
/**
|
|
* @return {!IconClosureInterface}
|
|
*/
|
|
export function createIcon() {
|
|
return /** @type {!IconClosureInterface} */ (document.createElement('devtools-icon'));
|
|
}
|