Skip to content

Commit

Permalink
Updated Scatter Chart with card component and card headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
chadstewart committed Jul 14, 2022
1 parent 1134127 commit 917dec4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions components/molecules/ScatterChart/scatter-chart.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import React from "react";
import Card from "components/atoms/Card/card";
import Text from "components/atoms/Typography/text";
import IconButton from "components/atoms/IconButton/icon-button";
import EChartWrapper from "components/atoms/EChartWrapper/echart-wrapper";

interface ScatterChartProps {
title: string;
option: Object;
}

const ScatterChart: React.FC<ScatterChartProps> = ({ option }) => {
const ScatterChart: React.FC<ScatterChartProps> = ({ title, option }) => {
return (
<EChartWrapper option={option} />
<Card>
<>
<div className="w-full flex justify-between">
<div>
<Text className="!text-light-slate-12 font-medium">
{title}
</Text>
</div>
<div>
<IconButton />
</div>
</div>
<EChartWrapper option={option} />
</>
</Card>
);
};

Expand Down
2 changes: 1 addition & 1 deletion stories/molecules/scatter-chart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ const ScatterChartTemplate: ComponentStory<typeof ScatterChart> = (args) => <Sca

// ScatterChart Default
export const Default = ScatterChartTemplate.bind({});
Default.args = { option: testOptions };
Default.args = { title: "Test Title", option: testOptions };

0 comments on commit 917dec4

Please sign in to comment.