Files
react-native-devtools-frontend/front_end/ui/components/docs/icon_button/basic.ts
T
Jack Franklin a3d3a82814 Remove component side-effect imports
They are not needed now we use Lit static tags.

Bug: 1153077
Change-Id: Ic5a7971e9e0dfc788d774b84d99c2538f6a3eadb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2896897
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-17 13:54:12 +00:00

68 lines
2.1 KiB
TypeScript

// Copyright 2021 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.
import * as FrontendHelpers from '../../../../../test/unittests/front_end/helpers/EnvironmentHelpers.js';
import * as ComponentHelpers from '../../helpers/helpers.js';
import * as IconButton from '../../icon_button/icon_button.js';
await ComponentHelpers.ComponentServerSetup.setup();
await FrontendHelpers.initializeGlobalVars();
function appendComponent(data: IconButton.IconButton.IconButtonData) {
const component = new IconButton.IconButton.IconButton();
component.data = data;
document.getElementById('container')?.appendChild(component);
}
appendComponent({
clickHandler: (): void => {},
groups: [{iconName: 'feedback_thin_16x16_icon', iconColor: 'black', text: '1 item'}],
});
appendComponent({
clickHandler: (): void => {},
groups: [{iconName: 'feedback_thin_16x16_icon', iconColor: 'black', text: '1 item'}],
});
appendComponent({
clickHandler: (): void => {},
groups: [
{iconName: 'feedback_thin_16x16_icon', iconColor: 'blue', text: 'Test'},
{iconName: 'warning_icon', iconColor: '', text: '1'},
],
});
appendComponent({
clickHandler: (): void => {},
groups: [
{iconName: 'issue-exclamation-icon', iconColor: 'yellow', text: '23', iconHeight: '2ex', iconWidth: '2ex'},
{iconName: 'issue-text-icon', iconColor: 'blue', text: '1'},
],
});
appendComponent({
groups: [
{iconName: 'issue-exclamation-icon', iconColor: 'yellow', text: '23'},
{iconName: 'issue-text-icon', iconColor: 'blue', text: '1'},
],
});
appendComponent({
clickHandler: (): void => {},
groups: [
{iconName: 'issue-exclamation-icon', iconColor: 'yellow', text: '23'},
{iconName: 'issue-text-icon', iconColor: 'blue', text: '1'},
],
trailingText: 'Issues',
});
appendComponent({
clickHandler: (): void => {},
groups: [
{iconName: 'issue-exclamation-icon', iconColor: 'yellow', text: '23'},
{iconName: 'issue-text-icon', iconColor: 'blue', text: '1'},
],
leadingText: 'Issues:',
});