Skip to content

Commit

Permalink
update LineChart.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaan6 committed Mar 12, 2023
1 parent 762a426 commit af2f993
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/components/LineChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, T
export const ChartHeaderWrapper = styled(Row)`
display: flex;
justify-content: space-between;
gap: 50px;
color: #0071bd;
`;

export const ChartTitleWrapper = styled(Typography.Title)`
display: flex;
justify-content: space-between;
gap: 50px;
color: #0071bd;
margin-top: 1.2rem;
`;

export const PriceContainerWrapper = styled(Col)`
Expand All @@ -36,14 +35,11 @@ export const PriceContainerWrapper = styled(Col)`
flex-wrap: wrap;
`;

export const PriceChangeWrapper = styled(Typography.Title)`
export const PriceWrapper = styled(Typography.Title)`
font-weight: 900;
margin-top: 10px !important;
`;

export const CurrentPriceWrapper = styled(Typography.Title)`
margin-top: 0px;
font-weight: 900;
`;

const LineChart = ({ coinHistory, currentPrice, coinName }) => {
const coinPrice = [];
Expand Down Expand Up @@ -84,10 +80,8 @@ const LineChart = ({ coinHistory, currentPrice, coinName }) => {
<ChartHeaderWrapper>
<ChartTitleWrapper level={2}>{coinName} Price Chart </ChartTitleWrapper>
<PriceContainerWrapper>
<PriceChangeWrapper level={5}>Change: {coinHistory?.data?.change}%</PriceChangeWrapper>
<CurrentPriceWrapper level={5}>
Current {coinName} Price: $ {currentPrice}
</CurrentPriceWrapper>
<PriceWrapper level={5}>Change: {coinHistory?.data?.change}%</PriceWrapper>
<PriceWrapper level={5}>Current {coinName} Price: $ {currentPrice}</PriceWrapper>
</PriceContainerWrapper>
</ChartHeaderWrapper>
<Line data={data} options={options} />
Expand Down

1 comment on commit af2f993

@vercel
Copy link

@vercel vercel bot commented on af2f993 Mar 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.