Home / File/ Icon.js — react Source File

Icon.js — react Source File

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

File javascript BabelCompiler Validation 2 imports 9 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  21af3248_c15c_a61c_1f5b_7409a91b945c["Icon.js"]
  3b673da8_86f9_42af_1550_ec795dce0241["Icon.css"]
  21af3248_c15c_a61c_1f5b_7409a91b945c --> 3b673da8_86f9_42af_1550_ec795dce0241
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  21af3248_c15c_a61c_1f5b_7409a91b945c --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  9930e8cf_03b4_86c0_be04_47b410246b71["Element.js"]
  9930e8cf_03b4_86c0_be04_47b410246b71 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  4c0d725a_27bd_a723_3599_a3e75bea5bd3["InspectedElement.js"]
  4c0d725a_27bd_a723_3599_a3e75bea5bd3 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  1be4c533_22f9_d4ee_5d61_bdd15076cee1["KeyValueContextMenuContainer.js"]
  1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  80ad5569_a221_98e5_daec_ede1bea33ee0["Tree.js"]
  80ad5569_a221_98e5_daec_ede1bea33ee0 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  6d9cc84b_c590_db27_2176_a1e548ac9492["ReportNewIssue.js"]
  6d9cc84b_c590_db27_2176_a1e548ac9492 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  b1d9750c_fd20_7898_0223_46fdfc9cdaf4["UpdateExistingIssue.js"]
  b1d9750c_fd20_7898_0223_46fdfc9cdaf4 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  d0363070_5c09_fccb_e8b3_095c3b1f45f4["WorkplaceGroup.js"]
  d0363070_5c09_fccb_e8b3_095c3b1f45f4 --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  9ae0d283_dcfa_919c_9bba_95892e72fbcd["SearchInput.js"]
  9ae0d283_dcfa_919c_9bba_95892e72fbcd --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  1356ba82_c85f_323e_8c5f_e616c171f6ad["TabBar.js"]
  1356ba82_c85f_323e_8c5f_e616c171f6ad --> 21af3248_c15c_a61c_1f5b_7409a91b945c
  style 21af3248_c15c_a61c_1f5b_7409a91b945c 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 styles from './Icon.css';

export type IconType =
  | 'arrow'
  | 'bug'
  | 'code'
  | 'components'
  | 'copy'
  | 'error'
  | 'facebook'
  | 'flame-chart'
  | 'profiler'
  | 'ranked-chart'
  | 'timeline'
  | 'search'
  | 'settings'
  | 'store-as-global-variable'
  | 'strict-mode-non-compliant'
  | 'suspense'
  | 'warning';

type Props = {
  className?: string,
  title?: string,
  type: IconType,
  ...
};

export default function Icon({
  className = '',
  title = '',
  type,
  ...props
}: Props): React.Node {
  let pathData = null;
  let viewBox = '0 0 24 24';
  switch (type) {
    case 'arrow':
      pathData = PATH_ARROW;
      break;
    case 'bug':
      pathData = PATH_BUG;
      break;
    case 'code':
      pathData = PATH_CODE;
      break;
    case 'components':
      pathData = PATH_COMPONENTS;
      break;
    case 'copy':
// ... (143 more lines)

Domain

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does Icon.js do?
Icon.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 Icon.js?
Icon.js defines 1 function(s): Icon.
What does Icon.js depend on?
Icon.js imports 2 module(s): Icon.css, react.
What files import Icon.js?
Icon.js is imported by 9 file(s): Element.js, InspectedElement.js, KeyValueContextMenuContainer.js, ReportNewIssue.js, SearchInput.js, TabBar.js, Tree.js, UpdateExistingIssue.js, and 1 more.
Where is Icon.js in the architecture?
Icon.js is located at packages/react-devtools-shared/src/devtools/views/Icon.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