From 9dc0cf02d9c7e1d3e0c5a8c7e34e0945399816a4 Mon Sep 17 00:00:00 2001
From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com>
Date: Wed, 17 Jul 2024 10:54:11 +0300
Subject: [PATCH 1/8] Move Source
---
.../src/components/HURUmap/Chart/index.js | 14 +++---
.../src/components/HURUmap/KeyMetric/index.js | 10 ++--
.../components/HURUmap/KeyMetric/useStyles.js | 3 --
.../src/components/HURUmap/Chart/index.js | 14 +++---
.../src/components/HURUmap/KeyMetric/index.js | 10 ++--
.../components/HURUmap/KeyMetric/useStyles.js | 3 --
packages/hurumap-core/package.json | 3 +-
packages/hurumap-core/src/Source/Source.js | 50 +++++++++++++++++++
packages/hurumap-core/src/Source/index.js | 3 ++
packages/hurumap-core/src/index.js | 1 +
pnpm-lock.yaml | 9 ++--
11 files changed, 92 insertions(+), 28 deletions(-)
create mode 100644 packages/hurumap-core/src/Source/Source.js
create mode 100644 packages/hurumap-core/src/Source/index.js
diff --git a/apps/climatemappedafrica/src/components/HURUmap/Chart/index.js b/apps/climatemappedafrica/src/components/HURUmap/Chart/index.js
index 2ecc33ebe..fbce581c3 100644
--- a/apps/climatemappedafrica/src/components/HURUmap/Chart/index.js
+++ b/apps/climatemappedafrica/src/components/HURUmap/Chart/index.js
@@ -1,3 +1,4 @@
+import { Source } from "@hurumap/core";
import { useMediaQuery } from "@mui/material";
import { ThemeProvider, StyledEngineProvider } from "@mui/material/styles";
import makeStyles from "@mui/styles/makeStyles";
@@ -12,10 +13,9 @@ import { calculateTooltipPosition, idify } from "./utils";
import ChartTooltip from "@/climatemappedafrica/components/HURUmap/ChartTooltip";
import IndicatorTitle from "@/climatemappedafrica/components/HURUmap/IndicatorTitle";
-import Source from "@/climatemappedafrica/components/HURUmap/Source";
import theme from "@/climatemappedafrica/theme";
-const useStyles = makeStyles(({ typography }) => ({
+const useStyles = makeStyles(() => ({
root: {
position: "relative",
width: "100%",
@@ -23,9 +23,6 @@ const useStyles = makeStyles(({ typography }) => ({
chart: {
width: "100%",
},
- source: {
- margin: `${typography.pxToRem(20)} 0`,
- },
}));
function Chart({
@@ -242,7 +239,12 @@ function Chart({
/>
)}
-