mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 12:33:47 +08:00
Change-Id: Ia407aa70fdbf4ad227f5a758f032744e760507b2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2436812 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
82 lines
2.1 KiB
HTML
82 lines
2.1 KiB
HTML
<!--
|
|
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.
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<title>Basic Layout Pane example</title>
|
|
<style>
|
|
#container {
|
|
width: 300px;
|
|
border: 1px solid black;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
</div>
|
|
|
|
<script type="module">
|
|
import * as ComponentHelpers from '../../component_helpers/component_helpers.js';
|
|
import {LayoutPane} from '../../elements/LayoutPane.js';
|
|
|
|
ComponentHelpers.ComponentServerSetup.setup().then(() => renderComponent());
|
|
|
|
const renderComponent = () => {
|
|
const component = new LayoutPane();
|
|
|
|
document.getElementById('container').appendChild(component);
|
|
|
|
component.data = {
|
|
gridElements: [
|
|
{
|
|
id: 1,
|
|
name: 'div',
|
|
domId: 'foo',
|
|
enabled: false,
|
|
},
|
|
{
|
|
id: 2,
|
|
name: 'div',
|
|
domClasses: ['for', 'bar', 'some-very-long-class-name-very-very-very-very-very-long'],
|
|
enabled: true,
|
|
}
|
|
],
|
|
settings: [
|
|
{
|
|
name: 'showGridTracks',
|
|
type: 'boolean',
|
|
value: false,
|
|
title: 'Show grid tracks',
|
|
options: [{
|
|
title: 'Show grid tracks',
|
|
value: true,
|
|
}, {
|
|
title: 'Do not show grid tracks',
|
|
value: false,
|
|
}]
|
|
},
|
|
{
|
|
name: 'showGridBorders',
|
|
type: 'enum',
|
|
value: "both",
|
|
title: 'Show grid borders',
|
|
options: [{
|
|
title: 'Show grid borders',
|
|
value: "both",
|
|
}, {
|
|
title: 'Do not show grid borders',
|
|
value: "none",
|
|
}]
|
|
}
|
|
],
|
|
};
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|