Home / File/ ThemeProvider.js — react Source File

ThemeProvider.js — react Source File

Architecture documentation for ThemeProvider.js, a javascript file in the react codebase. 3 imports, 2 dependents.

File javascript BabelCompiler Validation 3 imports 2 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  4d06d539_1d59_0b26_1097_d40ffb862127["ThemeProvider.js"]
  018de6d1_d68d_770a_284c_f0863628d125["useThemeStyles.js"]
  4d06d539_1d59_0b26_1097_d40ffb862127 --> 018de6d1_d68d_770a_284c_f0863628d125
  1d2b9513_4ad1_d535_e552_1bdcc4a6fe7b["useThemeStyles"]
  4d06d539_1d59_0b26_1097_d40ffb862127 --> 1d2b9513_4ad1_d535_e552_1bdcc4a6fe7b
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  4d06d539_1d59_0b26_1097_d40ffb862127 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  e2c52a93_982e_407f_9fee_e89aa134ae9d["DevTools.js"]
  e2c52a93_982e_407f_9fee_e89aa134ae9d --> 4d06d539_1d59_0b26_1097_d40ffb862127
  112f19f5_c561_f36f_4f9c_12048819ad24["portaledContent.js"]
  112f19f5_c561_f36f_4f9c_12048819ad24 --> 4d06d539_1d59_0b26_1097_d40ffb862127
  style 4d06d539_1d59_0b26_1097_d40ffb862127 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import * as React from 'react';
import useThemeStyles from './useThemeStyles';

export default function ThemeProvider({
  children,
}: {
  children: React.Node,
}): React.Node {
  const themeStyle = useThemeStyles();

  const style = React.useMemo(() => {
    return {
      ...themeStyle,
      width: '100%',
      height: '100%',
    };
  }, [themeStyle]);

  return <div style={style}>{children}</div>;
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does ThemeProvider.js do?
ThemeProvider.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ThemeProvider.js?
ThemeProvider.js defines 1 function(s): ThemeProvider.
What does ThemeProvider.js depend on?
ThemeProvider.js imports 3 module(s): react, useThemeStyles, useThemeStyles.js.
What files import ThemeProvider.js?
ThemeProvider.js is imported by 2 file(s): DevTools.js, portaledContent.js.
Where is ThemeProvider.js in the architecture?
ThemeProvider.js is located at packages/react-devtools-shared/src/devtools/views/ThemeProvider.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free