Skip to content

Commit d3d22d3

Browse files
authored
refactor(theme): nest theme icons under subfolder @theme/Icon/* (#7740)
1 parent c3ff131 commit d3d22d3

File tree

28 files changed

+39
-39
lines changed

28 files changed

+39
-39
lines changed

packages/docusaurus-theme-classic/src/getSwizzleConfig.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,35 +93,35 @@ export default function getSwizzleConfig(): SwizzleConfig {
9393
},
9494
description: 'The footer logo',
9595
},
96-
IconArrow: {
96+
'Icon/Arrow': {
9797
actions: {
9898
eject: 'safe',
9999
wrap: 'safe',
100100
},
101101
description: 'The arrow icon component',
102102
},
103-
IconDarkMode: {
103+
'Icon/DarkMode': {
104104
actions: {
105105
eject: 'safe',
106106
wrap: 'safe',
107107
},
108108
description: 'The dark mode icon component.',
109109
},
110-
IconEdit: {
110+
'Icon/Edit': {
111111
actions: {
112112
eject: 'safe',
113113
wrap: 'safe',
114114
},
115115
description: 'The edit icon component',
116116
},
117-
IconLightMode: {
117+
'Icon/LightMode': {
118118
actions: {
119119
eject: 'safe',
120120
wrap: 'safe',
121121
},
122122
description: 'The light mode icon component.',
123123
},
124-
IconMenu: {
124+
'Icon/Menu': {
125125
actions: {
126126
eject: 'safe',
127127
wrap: 'safe',

packages/docusaurus-theme-classic/src/theme-classic.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,71 +1256,71 @@ declare module '@theme/Logo' {
12561256
export default function Logo(props: Props): JSX.Element;
12571257
}
12581258

1259-
declare module '@theme/IconArrow' {
1259+
declare module '@theme/Icon/Arrow' {
12601260
import type {ComponentProps} from 'react';
12611261

12621262
export interface Props extends ComponentProps<'svg'> {}
12631263

12641264
export default function IconArrow(props: Props): JSX.Element;
12651265
}
12661266

1267-
declare module '@theme/IconDarkMode' {
1267+
declare module '@theme/Icon/DarkMode' {
12681268
import type {ComponentProps} from 'react';
12691269

12701270
export interface Props extends ComponentProps<'svg'> {}
12711271

12721272
export default function IconDarkMode(props: Props): JSX.Element;
12731273
}
12741274

1275-
declare module '@theme/IconEdit' {
1275+
declare module '@theme/Icon/Edit' {
12761276
import type {ComponentProps} from 'react';
12771277

12781278
export interface Props extends ComponentProps<'svg'> {}
12791279

12801280
export default function IconEdit(props: Props): JSX.Element;
12811281
}
12821282

1283-
declare module '@theme/IconHome' {
1283+
declare module '@theme/Icon/Home' {
12841284
import type {ComponentProps} from 'react';
12851285

12861286
export interface Props extends ComponentProps<'svg'> {}
12871287

12881288
export default function IconHome(props: Props): JSX.Element;
12891289
}
12901290

1291-
declare module '@theme/IconLightMode' {
1291+
declare module '@theme/Icon/LightMode' {
12921292
import type {ComponentProps} from 'react';
12931293

12941294
export interface Props extends ComponentProps<'svg'> {}
12951295

12961296
export default function IconLightMode(props: Props): JSX.Element;
12971297
}
12981298

1299-
declare module '@theme/IconMenu' {
1299+
declare module '@theme/Icon/Menu' {
13001300
import type {ComponentProps} from 'react';
13011301

13021302
export interface Props extends ComponentProps<'svg'> {}
13031303

13041304
export default function IconMenu(props: Props): JSX.Element;
13051305
}
13061306

1307-
declare module '@theme/IconClose' {
1307+
declare module '@theme/Icon/Close' {
13081308
import type {ComponentProps} from 'react';
13091309

13101310
export interface Props extends ComponentProps<'svg'> {}
13111311

13121312
export default function IconClose(props: Props): JSX.Element;
13131313
}
13141314

1315-
declare module '@theme/IconLanguage' {
1315+
declare module '@theme/Icon/Language' {
13161316
import type {ComponentProps} from 'react';
13171317

13181318
export interface Props extends ComponentProps<'svg'> {}
13191319

13201320
export default function IconLanguage(props: Props): JSX.Element;
13211321
}
13221322

1323-
declare module '@theme/IconExternalLink' {
1323+
declare module '@theme/Icon/ExternalLink' {
13241324
import type {ComponentProps} from 'react';
13251325

13261326
export interface Props extends ComponentProps<'svg'> {}

packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import clsx from 'clsx';
1010
import {useThemeConfig} from '@docusaurus/theme-common';
1111
import {useAnnouncementBar} from '@docusaurus/theme-common/internal';
1212
import {translate} from '@docusaurus/Translate';
13-
import IconClose from '@theme/IconClose';
13+
import IconClose from '@theme/Icon/Close';
1414

1515
import styles from './styles.module.css';
1616

packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import React from 'react';
99
import clsx from 'clsx';
1010
import useIsBrowser from '@docusaurus/useIsBrowser';
1111
import {translate} from '@docusaurus/Translate';
12-
import IconLightMode from '@theme/IconLightMode';
13-
import IconDarkMode from '@theme/IconDarkMode';
12+
import IconLightMode from '@theme/Icon/LightMode';
13+
import IconDarkMode from '@theme/Icon/DarkMode';
1414
import type {Props} from '@theme/ColorModeToggle';
1515

1616
import styles from './styles.module.css';

packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import Link from '@docusaurus/Link';
1616
import useBaseUrl from '@docusaurus/useBaseUrl';
1717
import {translate} from '@docusaurus/Translate';
18-
import IconHome from '@theme/IconHome';
18+
import IconHome from '@theme/Icon/Home';
1919

2020
import styles from './styles.module.css';
2121

packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import React from 'react';
99
import {translate} from '@docusaurus/Translate';
10-
import IconArrow from '@theme/IconArrow';
10+
import IconArrow from '@theme/Icon/Arrow';
1111
import type {Props} from '@theme/DocPage/Layout/Sidebar/ExpandButton';
1212

1313
import styles from './styles.module.css';

packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import React from 'react';
99
import clsx from 'clsx';
1010
import {translate} from '@docusaurus/Translate';
11-
import IconArrow from '@theme/IconArrow';
11+
import IconArrow from '@theme/Icon/Arrow';
1212
import type {Props} from '@theme/DocSidebar/Desktop/CollapseButton';
1313

1414
import styles from './styles.module.css';

packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {ThemeClassNames} from '@docusaurus/theme-common';
1111
import {isActiveSidebarItem} from '@docusaurus/theme-common/internal';
1212
import Link from '@docusaurus/Link';
1313
import isInternalUrl from '@docusaurus/isInternalUrl';
14-
import IconExternalLink from '@theme/IconExternalLink';
14+
import IconExternalLink from '@theme/Icon/ExternalLink';
1515
import type {Props} from '@theme/DocSidebarItem/Link';
1616

1717
import styles from './styles.module.css';

packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import React from 'react';
99
import Translate from '@docusaurus/Translate';
1010
import {ThemeClassNames} from '@docusaurus/theme-common';
11-
import IconEdit from '@theme/IconEdit';
11+
import IconEdit from '@theme/Icon/Edit';
1212
import type {Props} from '@theme/EditThisPage';
1313

1414
export default function EditThisPage({editUrl}: Props): JSX.Element {

packages/docusaurus-theme-classic/src/theme/Footer/LinkItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React from 'react';
1010
import Link from '@docusaurus/Link';
1111
import useBaseUrl from '@docusaurus/useBaseUrl';
1212
import isInternalUrl from '@docusaurus/isInternalUrl';
13-
import IconExternalLink from '@theme/IconExternalLink';
13+
import IconExternalLink from '@theme/Icon/ExternalLink';
1414
import type {Props} from '@theme/Footer/LinkItem';
1515

1616
export default function FooterLinkItem({item}: Props): JSX.Element {

0 commit comments

Comments
 (0)