diff --git a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx index b6c3e975e2..2259c9db99 100644 --- a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import clsx from 'clsx'; import {useThemeConfig, useAnnouncementBar} from '@docusaurus/theme-common'; import {translate} from '@docusaurus/Translate'; -import IconCloseThick from '@theme/IconCloseThick'; +import IconClose from '@theme/IconClose'; import styles from './styles.module.css'; @@ -49,7 +49,7 @@ function AnnouncementBar(): JSX.Element | null { message: 'Close', description: 'The ARIA label for close button of announcement bar', })}> - + ) : null} diff --git a/packages/docusaurus-theme-classic/src/theme/IconClose/index.tsx b/packages/docusaurus-theme-classic/src/theme/IconClose/index.tsx new file mode 100644 index 0000000000..1b39a390e1 --- /dev/null +++ b/packages/docusaurus-theme-classic/src/theme/IconClose/index.tsx @@ -0,0 +1,26 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import React from 'react'; +import type {Props} from '@theme/IconClose'; + +export default function IconClose({ + width = 21, + height = 21, + color = 'currentColor', + strokeWidth = 1.2, + className, + ...restProps +}: Props): JSX.Element { + return ( + + + + + + ); +} diff --git a/packages/docusaurus-theme-classic/src/theme/IconCloseThick/index.tsx b/packages/docusaurus-theme-classic/src/theme/IconCloseThick/index.tsx deleted file mode 100644 index 971dfd7e73..0000000000 --- a/packages/docusaurus-theme-classic/src/theme/IconCloseThick/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import type {Props} from '@theme/IconCloseThick'; - -export default function IconCloseThick({ - width = 20, - height = 20, - className, - ...restProps -}: Props): JSX.Element { - return ( - - - - ); -} diff --git a/packages/docusaurus-theme-classic/src/theme/IconCloseThin/index.tsx b/packages/docusaurus-theme-classic/src/theme/IconCloseThin/index.tsx deleted file mode 100644 index 60c33ada58..0000000000 --- a/packages/docusaurus-theme-classic/src/theme/IconCloseThin/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import type {Props} from '@theme/IconCloseThin'; - -export default function IconCloseThin({ - width = 20, - height = 20, - className, - ...restProps -}: Props): JSX.Element { - return ( - - - - ); -} diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx index ca637c5235..0a228c4fd5 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx @@ -24,7 +24,7 @@ import {useActivePlugin} from '@theme/hooks/useDocs'; import NavbarItem, {Props as NavbarItemConfig} from '@theme/NavbarItem'; import Logo from '@theme/Logo'; import IconMenu from '@theme/IconMenu'; -import IconCloseThin from '@theme/IconCloseThin'; +import IconClose from '@theme/IconClose'; import styles from './styles.module.css'; @@ -180,9 +180,8 @@ function NavbarMobileSidebar({ type="button" className="clean-btn navbar-sidebar__close" onClick={toggleSidebar}> - diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/styles.module.css b/packages/docusaurus-theme-classic/src/theme/Navbar/styles.module.css index dc0a77a42e..d53b81e13c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/styles.module.css @@ -25,7 +25,3 @@ Hide toggle in small viewports .navbarSidebarToggle { margin-right: 1rem; } - -.navbarSidebarCloseSvg { - fill: var(--ifm-color-emphasis-600); -} diff --git a/packages/docusaurus-theme-classic/src/types.d.ts b/packages/docusaurus-theme-classic/src/types.d.ts index fd8bd37080..170f41f116 100644 --- a/packages/docusaurus-theme-classic/src/types.d.ts +++ b/packages/docusaurus-theme-classic/src/types.d.ts @@ -708,18 +708,11 @@ declare module '@theme/IconMenu' { export default IconMenu; } -declare module '@theme/IconCloseThick' { +declare module '@theme/IconClose' { import type {ComponentProps} from 'react'; export type Props = ComponentProps<'svg'>; - export default function IconCloseThick(props: Props): JSX.Element; -} - -declare module '@theme/IconCloseThin' { - import type {ComponentProps} from 'react'; - - export type Props = ComponentProps<'svg'>; - export default function IconCloseThin(props: Props): JSX.Element; + export default function IconClose(props: Props): JSX.Element; } declare module '@theme/IconLanguage' {