diff --git a/shared/constants/network.ts b/shared/constants/network.ts index cf41cc06f9e3..9e15cffd201f 100644 --- a/shared/constants/network.ts +++ b/shared/constants/network.ts @@ -3,14 +3,14 @@ import { capitalize, pick } from 'lodash'; * A type representing any valid value for 'type' for setProviderType and other * methods that add or manipulate networks in MetaMask state. */ -export type NetworkType = typeof NETWORK_TYPES[keyof typeof NETWORK_TYPES]; +export type NetworkType = (typeof NETWORK_TYPES)[keyof typeof NETWORK_TYPES]; /** * A union type of all possible hard-coded chain ids. This type is not * exhaustive and cannot be used for typing chainId in areas where the user or * dapp may specify any chainId. */ -export type ChainId = typeof CHAIN_IDS[keyof typeof CHAIN_IDS]; +export type ChainId = (typeof CHAIN_IDS)[keyof typeof CHAIN_IDS]; /** * A type that is a union type of all possible hardcoded currency symbols. @@ -18,13 +18,13 @@ export type ChainId = typeof CHAIN_IDS[keyof typeof CHAIN_IDS]; * or dapp may supply their own symbol. */ export type CurrencySymbol = - typeof CURRENCY_SYMBOLS[keyof typeof CURRENCY_SYMBOLS]; + (typeof CURRENCY_SYMBOLS)[keyof typeof CURRENCY_SYMBOLS]; /** * Test networks have special symbols that combine the network name and 'ETH' * so that they are distinct from mainnet and other networks that use 'ETH'. */ export type TestNetworkCurrencySymbol = - typeof TEST_NETWORK_TICKER_MAP[keyof typeof TEST_NETWORK_TICKER_MAP]; + (typeof TEST_NETWORK_TICKER_MAP)[keyof typeof TEST_NETWORK_TICKER_MAP]; /** * An object containing preferences for an RPC definition diff --git a/ui/components/component-library/avatar-network/avatar-network.stories.tsx b/ui/components/component-library/avatar-network/avatar-network.stories.tsx index d5947c2a981a..36b5eee12d28 100644 --- a/ui/components/component-library/avatar-network/avatar-network.stories.tsx +++ b/ui/components/component-library/avatar-network/avatar-network.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { ComponentStory, ComponentMeta } from '@storybook/react'; +import { StoryFn, Meta } from '@storybook/react'; import { - DISPLAY, + Display, TextColor, BackgroundColor, BorderColor, @@ -56,19 +56,19 @@ export default { size: AvatarNetworkSize.Md, showHalo: false, }, -} as ComponentMeta; +} as Meta; -const Template: ComponentStory = (args) => { +const Template: StoryFn = (args) => { return ; }; export const DefaultStory = Template.bind({}); DefaultStory.storyName = 'Default'; -export const SizeStory: ComponentStory = (args) => ( +export const SizeStory: StoryFn = (args) => ( <> = (args) => ( - + @@ -95,8 +95,8 @@ Name.args = { src: '', }; -export const Src: ComponentStory = (args) => ( - +export const Src: StoryFn = (args) => ( + @@ -114,10 +114,10 @@ ShowHalo.args = { showHalo: true, }; -export const ColorBackgroundColorAndBorderColor: ComponentStory< +export const ColorBackgroundColorAndBorderColor: StoryFn< typeof AvatarNetwork > = (args) => ( - + { * {@link https://github.com/MetaMask/metamask-extension/issues/19526} */ declare const Box: React.FC; -export default Box; \ No newline at end of file +export default Box;