From ddc150b45d9809cc91221f9c5e77cc5c95f76632 Mon Sep 17 00:00:00 2001 From: Moshe Date: Mon, 27 Nov 2023 17:35:06 +0200 Subject: [PATCH] refactor: moves widget util to shared folder (#243) --- src/App.scss | 1 + src/pages/components/Widget.stories.tsx | 2 +- src/pages/dashboard/DashboardPage.scss | 6 ------ src/shared/shared.css | 8 ++++++++ 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 src/shared/shared.css diff --git a/src/App.scss b/src/App.scss index 4ce8e644..85524a57 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,6 +1,7 @@ // import hebbo: @import 'https://fonts.googleapis.com/css?family=Heebo:400,500,700&display=swap'; @import './resources/variables.scss'; +@import './shared/shared.css'; .main { flex-direction: row; diff --git a/src/pages/components/Widget.stories.tsx b/src/pages/components/Widget.stories.tsx index 4d67cf0d..75652428 100644 --- a/src/pages/components/Widget.stories.tsx +++ b/src/pages/components/Widget.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react' import { BusToolTip } from './MapLayers/BusToolTip' -import '../dashboard/DashboardPage.scss' +import '../../shared/shared.css' const meta = { title: 'Components/Widget', component: () => ( diff --git a/src/pages/dashboard/DashboardPage.scss b/src/pages/dashboard/DashboardPage.scss index c5f4a817..ce99182a 100644 --- a/src/pages/dashboard/DashboardPage.scss +++ b/src/pages/dashboard/DashboardPage.scss @@ -8,12 +8,6 @@ } .widget { - border: 1px solid #e0e0e0; - border-radius: 4px; - padding: 20px; - box-sizing: border-box; - margin-bottom: 20px; - background-color: white; .chart { height: 400px; diff --git a/src/shared/shared.css b/src/shared/shared.css new file mode 100644 index 00000000..40834a01 --- /dev/null +++ b/src/shared/shared.css @@ -0,0 +1,8 @@ +.widget { + border: 1px solid #e0e0e0; + border-radius: 4px; + padding: 20px; + box-sizing: border-box; + margin-bottom: 20px; + background-color: white; +}