mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-09 21:28:43 +08:00
Bug: none Change-Id: Id164a7fba185d16816ceb52e3cac81f6609b83ec Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2696665 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
// 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.
|
|
|
|
import * as Common from '../common/common.js';
|
|
|
|
export interface BaseSettingOption {
|
|
title: string;
|
|
}
|
|
|
|
export interface BooleanSettingOption extends BaseSettingOption {
|
|
value: boolean;
|
|
}
|
|
|
|
export interface EnumSettingOption extends BaseSettingOption {
|
|
value: string;
|
|
}
|
|
|
|
export interface BaseSetting {
|
|
name: string;
|
|
type: Common.Settings.SettingType.BOOLEAN|Common.Settings.SettingType.ENUM;
|
|
title: string;
|
|
}
|
|
|
|
export type BooleanSetting = BaseSetting&{options: BooleanSettingOption[], value: boolean};
|
|
export type EnumSetting = BaseSetting&{options: EnumSettingOption[], value: string};
|
|
export type Setting = EnumSetting|BooleanSetting;
|
|
|
|
export interface LayoutElement {
|
|
id: number;
|
|
color: string;
|
|
name: string;
|
|
domId?: string;
|
|
domClasses?: string[];
|
|
enabled: boolean;
|
|
reveal: () => void;
|
|
toggle: (value: boolean) => void;
|
|
setColor: (value: string) => void;
|
|
highlight: () => void;
|
|
hideHighlight: () => void;
|
|
}
|