From d4bffdc475ace25224207b7580149197b64fd940 Mon Sep 17 00:00:00 2001 From: m7kvqbe1 <48086589+m7kvqbe1@users.noreply.github.com> Date: Wed, 15 Dec 2021 11:20:15 +0000 Subject: [PATCH] refactor(Icons): Replace legacy `Graph`, `House` and `Tools` icons --- .../src/components/_sidebar.scss | 1 + .../Sidebar/Sidebar.stories.tsx | 20 +++++++++---------- .../Sidebar/Sidebar.test.tsx | 8 ++++---- .../src/icons/Graph.tsx | 13 ------------ .../src/icons/House.tsx | 18 ----------------- .../src/icons/Tools.tsx | 16 --------------- .../src/icons/index.ts | 3 --- 7 files changed, 15 insertions(+), 64 deletions(-) delete mode 100644 packages/react-component-library/src/icons/Graph.tsx delete mode 100644 packages/react-component-library/src/icons/House.tsx delete mode 100644 packages/react-component-library/src/icons/Tools.tsx diff --git a/packages/css-framework/src/components/_sidebar.scss b/packages/css-framework/src/components/_sidebar.scss index f7627f7c50..766ab9bff7 100644 --- a/packages/css-framework/src/components/_sidebar.scss +++ b/packages/css-framework/src/components/_sidebar.scss @@ -49,6 +49,7 @@ body.has-sidebar { align-items: center; justify-content: center; width: $bar-width - $border; + color: f.color('neutral', '200'); } .rn-iconfill { diff --git a/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.stories.tsx b/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.stories.tsx index 57f62d1514..e291cbb3da 100644 --- a/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.stories.tsx +++ b/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.stories.tsx @@ -1,7 +1,7 @@ import React from 'react' import { ComponentStory, ComponentMeta } from '@storybook/react' +import { IconHome, IconBarChart, IconTune } from '@defencedigital/icon-library' -import { Graph, House, Tools } from '../../../icons' import { Link } from '../../Link' import { Notification, Notifications } from '../NotificationPanel' import { Sidebar, SidebarNav, SidebarNavItem, SidebarUser } from './index' @@ -31,13 +31,13 @@ export default { export const Default: ComponentStory = (props) => { const nav = ( - Home} /> + Home} /> Stats} isActive /> - Tools} /> + Settings} /> ) @@ -51,13 +51,13 @@ export const WithUser: ComponentStory = (props) => { const nav = ( - Home} /> + Home} /> Stats} isActive /> - Tools} /> + Settings} /> ) @@ -105,13 +105,13 @@ export const WithNotifications: ComponentStory = (props) => { const nav = ( - Home} /> + Home} /> Stats} isActive /> - Tools} /> + Settings} /> ) diff --git a/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.test.tsx b/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.test.tsx index 4c5a068416..cef80c2a80 100644 --- a/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.test.tsx +++ b/packages/react-component-library/src/components/TopLevelNavigation/Sidebar/Sidebar.test.tsx @@ -1,10 +1,10 @@ import React from 'react' import '@testing-library/jest-dom/extend-expect' import { fireEvent, render, RenderResult } from '@testing-library/react' +import { IconHome, IconBarChart, IconTune } from '@defencedigital/icon-library' import { Link } from '../../Link' import { Sidebar, SidebarNav, SidebarNavItem, SidebarUser } from './index' -import { Graph, House, Tools } from '../../../icons' import { Notification, Notifications } from '../NotificationPanel' describe('Sidebar', () => { @@ -42,16 +42,16 @@ describe('Sidebar', () => { Home} /> Stats} isActive /> Tools} /> diff --git a/packages/react-component-library/src/icons/Graph.tsx b/packages/react-component-library/src/icons/Graph.tsx deleted file mode 100644 index 12679edfa9..0000000000 --- a/packages/react-component-library/src/icons/Graph.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react' - -export const Graph: React.FC = ({ ...rest }) => ( - - - - - - - -) - -Graph.displayName = 'GraphIcon' diff --git a/packages/react-component-library/src/icons/House.tsx b/packages/react-component-library/src/icons/House.tsx deleted file mode 100644 index 7e38790ba4..0000000000 --- a/packages/react-component-library/src/icons/House.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' - -export const House: React.FC = ({ ...rest }) => ( - - - - - - - -) - -House.displayName = 'HouseIcon' diff --git a/packages/react-component-library/src/icons/Tools.tsx b/packages/react-component-library/src/icons/Tools.tsx deleted file mode 100644 index fbf3817630..0000000000 --- a/packages/react-component-library/src/icons/Tools.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react' - -export const Tools: React.FC = ({ ...rest }) => ( - - - - - - - - - - -) - -Tools.displayName = 'ToolsIcon' diff --git a/packages/react-component-library/src/icons/index.ts b/packages/react-component-library/src/icons/index.ts index 5cc5a33dff..3f85e66e57 100644 --- a/packages/react-component-library/src/icons/index.ts +++ b/packages/react-component-library/src/icons/index.ts @@ -1,8 +1,5 @@ -export * from './Graph' -export * from './House' export * from './Logo' export * from './Right-Arrow' export * from './Search' -export * from './Tools' export * from './Visibility' export * from './VisibilityOff'