mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-30 09:54:02 +08:00
Just to make it look a little nicer! https://imgur.com/a/uelnn6K Bug: none Change-Id: Ie65dc11d7a4047e2c2c6816baa66d47d32259c11 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3347792 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Andres Olivares <andoli@chromium.org> Commit-Queue: Andres Olivares <andoli@chromium.org>
29 lines
1013 B
TypeScript
29 lines
1013 B
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.
|
|
|
|
// Ensure all image variables are defined in the component docs.
|
|
import '../../../Images/Images.js';
|
|
|
|
import * as CreateBreadcrumbs from './create_breadcrumbs.js';
|
|
import * as ToggleDarkMode from './toggle_dark_mode.js';
|
|
import * as ToggleFonts from './toggle_fonts.js';
|
|
|
|
ToggleDarkMode.init();
|
|
CreateBreadcrumbs.init();
|
|
ToggleFonts.init();
|
|
|
|
// This can be used by tests to hide the UI elements that are part of the component docs interface.
|
|
// E.g., this is useful for screenshot tests.
|
|
window.addEventListener('hidecomponentdocsui', () => {
|
|
for (const node of document.querySelectorAll<HTMLElement>('.component-docs-ui')) {
|
|
node.style.display = 'none';
|
|
}
|
|
});
|
|
|
|
window.addEventListener('showcomponentdocsui', () => {
|
|
for (const node of document.querySelectorAll<HTMLElement>('.component-docs-ui')) {
|
|
node.style.display = '';
|
|
}
|
|
});
|