diff --git a/changelogs/fragments/7478.yml b/changelogs/fragments/7478.yml new file mode 100644 index 000000000000..67e39be073c4 --- /dev/null +++ b/changelogs/fragments/7478.yml @@ -0,0 +1,2 @@ +fix: +- Update recent items icon from SVG to react component ([#7478](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7478)) \ No newline at end of file diff --git a/src/core/public/chrome/ui/header/__snapshots__/recent_items.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/recent_items.test.tsx.snap index 70db9b11a08c..d6255095c0bb 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/recent_items.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/recent_items.test.tsx.snap @@ -24,7 +24,7 @@ exports[`Recent items should render base element normally 1`] = ` class="euiHeaderSectionItemButton__content" > diff --git a/src/core/public/chrome/ui/header/assets/recent_items.svg b/src/core/public/chrome/ui/header/assets/recent_items.svg deleted file mode 100644 index b6427c5e59e4..000000000000 --- a/src/core/public/chrome/ui/header/assets/recent_items.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/core/public/chrome/ui/header/recent_items.tsx b/src/core/public/chrome/ui/header/recent_items.tsx index 1d91ac286a91..f39260056c5c 100644 --- a/src/core/public/chrome/ui/header/recent_items.tsx +++ b/src/core/public/chrome/ui/header/recent_items.tsx @@ -20,8 +20,8 @@ import { WorkspaceObject } from '../../../workspace'; import { createRecentNavLink } from './nav_link'; import { HttpStart } from '../../../http'; import { ChromeNavLink } from '../../../'; -// TODO: replace this icon once added to OUI -import recent_items from './assets/recent_items.svg'; +// TODO: replace this icon once added to OUI https://github.com/opensearch-project/OpenSearch-Dashboards/issues/7354 +import { RecentItemsIcon } from './recent_items_icon'; export interface Props { recentlyAccessed$: Rx.Observable; @@ -71,7 +71,7 @@ export const RecentItems = ({ }} data-test-subj="recentItemsSectionButton" > - + } isOpen={isPopoverOpen} diff --git a/src/core/public/chrome/ui/header/recent_items_icon.tsx b/src/core/public/chrome/ui/header/recent_items_icon.tsx new file mode 100644 index 000000000000..0d9857b182c5 --- /dev/null +++ b/src/core/public/chrome/ui/header/recent_items_icon.tsx @@ -0,0 +1,17 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +import React from 'react'; + +// TODO: remove this icon once added to OUI https://github.com/opensearch-project/OpenSearch-Dashboards/issues/7354 +export const RecentItemsIcon = () => { + return ( + + + + ); +}; diff --git a/src/core/typings.ts b/src/core/typings.ts index c5e97e2b1d7c..97b83c91e031 100644 --- a/src/core/typings.ts +++ b/src/core/typings.ts @@ -36,10 +36,3 @@ type DeeplyMockedKeys = { T; type MockedKeys = { [P in keyof T]: jest.Mocked }; - -// Need to declare like typings/index.d.ts otherwise would be overwritten -declare module '*.svg' { - const content: string; - // eslint-disable-next-line import/no-default-export - export default content; -}