Files
react-native-devtools-frontend/front_end/elements/Icon_bridge.js
T
Kateryna Prokopenko 704e6d67c1 Icon component
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>
2020-10-14 15:04:42 +00:00

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'));
}