From 658ceb90d148d7d46caad8935137534258c5dd65 Mon Sep 17 00:00:00 2001 From: Dhruv <79097544+dhruvv173@users.noreply.github.com> Date: Fri, 4 Aug 2023 22:41:55 +0530 Subject: [PATCH] Fix-Migrate Picker-Network to TS (#20365) * migrating PickerNetwork to TS * deleting js file * deleting js snapshot * fixing e2e tests and updating snapshot * updating snapshot * Some small updates to docs and types --------- Co-authored-by: georgewrmarshall Co-authored-by: Garrett Bear --- .../picker-network/README.mdx | 2 - ...t.js.snap => picker-network.test.tsx.snap} | 2 +- .../component-library/picker-network/index.js | 1 - .../component-library/picker-network/index.ts | 5 ++ .../picker-network/picker-network.js | 89 ------------------- ....stories.js => picker-network.stories.tsx} | 18 ++-- ...etwork.test.js => picker-network.test.tsx} | 0 .../picker-network/picker-network.tsx | 72 +++++++++++++++ .../picker-network/picker-network.types.ts | 36 ++++++++ .../__snapshots__/app-header.test.js.snap | 2 +- 10 files changed, 124 insertions(+), 103 deletions(-) rename ui/components/component-library/picker-network/__snapshots__/{picker-network.test.js.snap => picker-network.test.tsx.snap} (82%) delete mode 100644 ui/components/component-library/picker-network/index.js create mode 100644 ui/components/component-library/picker-network/index.ts delete mode 100644 ui/components/component-library/picker-network/picker-network.js rename ui/components/component-library/picker-network/{picker-network.stories.js => picker-network.stories.tsx} (74%) rename ui/components/component-library/picker-network/{picker-network.test.js => picker-network.test.tsx} (100%) create mode 100644 ui/components/component-library/picker-network/picker-network.tsx create mode 100644 ui/components/component-library/picker-network/picker-network.types.ts diff --git a/ui/components/component-library/picker-network/README.mdx b/ui/components/component-library/picker-network/README.mdx index 2d7185d99..2e31576f8 100644 --- a/ui/components/component-library/picker-network/README.mdx +++ b/ui/components/component-library/picker-network/README.mdx @@ -12,8 +12,6 @@ The `PickerNetwork` is used for the action of changing a network. ## Props -The `PickerNetwork` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props. - ### Label diff --git a/ui/components/component-library/picker-network/__snapshots__/picker-network.test.js.snap b/ui/components/component-library/picker-network/__snapshots__/picker-network.test.tsx.snap similarity index 82% rename from ui/components/component-library/picker-network/__snapshots__/picker-network.test.js.snap rename to ui/components/component-library/picker-network/__snapshots__/picker-network.test.tsx.snap index 42534287b..2b2226998 100644 --- a/ui/components/component-library/picker-network/__snapshots__/picker-network.test.js.snap +++ b/ui/components/component-library/picker-network/__snapshots__/picker-network.test.tsx.snap @@ -3,7 +3,7 @@ exports[`PickerNetwork should render the label inside the PickerNetwork 1`] = `