Files
react-native-devtools-frontend/front_end/component_docs/component_docs.ts
T
Jack Franklin 3642900e6d Load new theme colours in the component docs.
This CL updates the component docs server so it automatically injects the new
colour variables (which are part of the dark mode work) into the server. It
contains the following changes:

1. Pulling out the new colours into a new CSS file,
   `ui/themeColors.css`, which contain all the new definitions.
2. Injecting that new file where we inject `inspectorStyles.css`
   currently.
3. Updating the component docs server to intercept any requests to load
   an HTML example file, read the HTML contents and inject a `<style>`
   tag to load in the theme colours.
4. Additionally we now provide a small bit of JS that adds a handy
   button to toggle light/dark mode without needing to dive into the dev
   tools.

Fixed: 1152774
Change-Id: Ia2df0e00315dfeb532570ea5634fa54677337f76
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560941
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-25 16:26:10 +00:00

8 lines
247 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.
import * as ToggleDarkMode from './toggle_dark_mode.js';
ToggleDarkMode.init();