Home / Function/ DeleteToggle() — react Function Reference

DeleteToggle() — react Function Reference

Architecture documentation for the DeleteToggle() function in KeyValue.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  f4c6186b_7c79_ba7a_dac0_287b840d83d8["DeleteToggle()"]
  276bc34e_3008_101e_3cd7_cc895fcd3848["KeyValue.js"]
  f4c6186b_7c79_ba7a_dac0_287b840d83d8 -->|defined in| 276bc34e_3008_101e_3cd7_cc895fcd3848
  style f4c6186b_7c79_ba7a_dac0_287b840d83d8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js lines 565–586

function DeleteToggle({deletePath, name, path}) {
  // $FlowFixMe[missing-local-annot]
  const handleClick = event => {
    event.stopPropagation();
    deletePath(path);
  };

  return (
    <>
      <Button
        className={styles.DeleteArrayItemButton}
        onClick={handleClick}
        title="Delete entry">
        <ButtonIcon type="delete" />
      </Button>
      <span className={styles.Name}>
        {name}
        <span className={styles.AfterName}>:</span>
      </span>
    </>
  );
}

Domain

Subdomains

Frequently Asked Questions

What does DeleteToggle() do?
DeleteToggle() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js.
Where is DeleteToggle() defined?
DeleteToggle() is defined in packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js at line 565.

Analyze Your Own Codebase

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

Try Supermodel Free