From 59365a5711b8bf4b43fb857ef2b95c8446611b76 Mon Sep 17 00:00:00 2001 From: savindi7 Date: Tue, 14 Feb 2023 11:16:13 +0530 Subject: [PATCH] chore(react): rename interfaces --- packages/react/src/components/Header/Header.tsx | 4 ++-- .../react/src/components/MenuItem/MenuItem.stories.mdx | 10 +++++----- .../components/UserDropdownMenu/UserDropdownMenu.tsx | 6 +++--- .../react/src/components/UserDropdownMenu/index.ts | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/react/src/components/Header/Header.tsx b/packages/react/src/components/Header/Header.tsx index 82d3b52a..906db3ad 100644 --- a/packages/react/src/components/Header/Header.tsx +++ b/packages/react/src/components/Header/Header.tsx @@ -33,7 +33,7 @@ import IconButton from '../IconButton'; import Link from '../Link'; import Toolbar from '../Toolbar'; import Typography from '../Typography'; -import UserDropdownMenu, {ModeListInterface, UserTemplate} from '../UserDropdownMenu'; +import UserDropdownMenu, {ModeList, UserTemplate} from '../UserDropdownMenu'; export interface HeaderProps extends AppBarProps { /** @@ -51,7 +51,7 @@ export interface HeaderProps extends AppBarProps { /** * List of modes. */ - modes?: ModeListInterface[]; + modes?: ModeList[]; /** * Function to handle left navigation bar button toggle. */ diff --git a/packages/react/src/components/MenuItem/MenuItem.stories.mdx b/packages/react/src/components/MenuItem/MenuItem.stories.mdx index 0bb5b649..db50fd95 100644 --- a/packages/react/src/components/MenuItem/MenuItem.stories.mdx +++ b/packages/react/src/components/MenuItem/MenuItem.stories.mdx @@ -12,11 +12,11 @@ export const meta = { export const Template = (args) => { - return ( - - - - ) + return ( + + + + ) }; # Menu Item diff --git a/packages/react/src/components/UserDropdownMenu/UserDropdownMenu.tsx b/packages/react/src/components/UserDropdownMenu/UserDropdownMenu.tsx index b590e522..979cdb45 100644 --- a/packages/react/src/components/UserDropdownMenu/UserDropdownMenu.tsx +++ b/packages/react/src/components/UserDropdownMenu/UserDropdownMenu.tsx @@ -51,7 +51,7 @@ export interface UserDropdownMenuProps extends Omit & WithWrapperProps = ( <> {modesHeading} - {modes?.map((theme: ModeListInterface) => { + {modes?.map((theme: ModeList) => { const {name, icon} = theme; return ( handleModeChange(name)}> diff --git a/packages/react/src/components/UserDropdownMenu/index.ts b/packages/react/src/components/UserDropdownMenu/index.ts index 62161f74..c15e0cce 100644 --- a/packages/react/src/components/UserDropdownMenu/index.ts +++ b/packages/react/src/components/UserDropdownMenu/index.ts @@ -17,6 +17,6 @@ */ export {default} from './UserDropdownMenu'; -export {UserDropdownMenuProps} from './UserDropdownMenu'; -export {ModeListInterface} from './UserDropdownMenu'; -export {UserTemplate} from './UserDropdownMenu'; +export type {UserDropdownMenuProps} from './UserDropdownMenu'; +export type {ModeList} from './UserDropdownMenu'; +export type {UserTemplate} from './UserDropdownMenu';