From 0bc2e3281faf4334c9b5728818a947c5f07678a9 Mon Sep 17 00:00:00 2001 From: Pavan Soratur Date: Wed, 19 Jul 2023 08:45:24 -0700 Subject: [PATCH] Adds hubble-stats chart component to webb-ui-components and storybook (#1430) --- apps/hubble-stats/app/layout.tsx | 7 +- apps/hubble-stats/app/page.tsx | 3 +- .../components/Areachart/Areachart.tsx | 58 +++++++ .../components/Areachart/index.ts | 2 + .../components/Areachart/types.ts | 8 + .../components/Barchart/Barchart.tsx | 53 ++++++ .../hubble-stats/components/Barchart/index.ts | 2 + .../hubble-stats/components/Barchart/types.ts | 8 + .../hubble-stats/components/Header/Header.tsx | 2 +- apps/hubble-stats/components/index.ts | 2 + .../KeyMetricsTableContainer.tsx | 3 +- .../VolumeChartsContainer.tsx | 100 +++++++++++ .../containers/VolumeChartsContainer/index.ts | 1 + .../ChartContainer/ChartContainer.tsx | 120 +++++++++++++ .../src/components/ChartContainer/index.ts | 2 + .../src/components/ChartContainer/types.ts | 18 ++ .../src/components/index.ts | 1 + .../webb-ui-components/src/css/typography.css | 4 + .../organisms/ChartContainer.stories.jsx | 159 ++++++++++++++++++ package.json | 1 + yarn.lock | 145 ++++++++++++++++ 21 files changed, 691 insertions(+), 8 deletions(-) create mode 100644 apps/hubble-stats/components/Areachart/Areachart.tsx create mode 100644 apps/hubble-stats/components/Areachart/index.ts create mode 100644 apps/hubble-stats/components/Areachart/types.ts create mode 100644 apps/hubble-stats/components/Barchart/Barchart.tsx create mode 100644 apps/hubble-stats/components/Barchart/index.ts create mode 100644 apps/hubble-stats/components/Barchart/types.ts create mode 100644 apps/hubble-stats/containers/VolumeChartsContainer/VolumeChartsContainer.tsx create mode 100644 apps/hubble-stats/containers/VolumeChartsContainer/index.ts create mode 100644 libs/webb-ui-components/src/components/ChartContainer/ChartContainer.tsx create mode 100644 libs/webb-ui-components/src/components/ChartContainer/index.ts create mode 100644 libs/webb-ui-components/src/components/ChartContainer/types.ts create mode 100644 libs/webb-ui-components/src/stories/organisms/ChartContainer.stories.jsx diff --git a/apps/hubble-stats/app/layout.tsx b/apps/hubble-stats/app/layout.tsx index 1c7da27883..38a7296bab 100644 --- a/apps/hubble-stats/app/layout.tsx +++ b/apps/hubble-stats/app/layout.tsx @@ -1,7 +1,5 @@ 'use client'; - import { useEffect } from 'react'; -import Head from 'next/head'; import { WebbUIProvider, useDarkMode, @@ -97,8 +95,9 @@ export default function RootLayout({ logoLink={WEBB_MKT_URL} footer={footer} /> -
-
+ +
+
{children}