From 40916f77dac52a21bb014caea7888f058b79143f Mon Sep 17 00:00:00 2001 From: Yana Date: Tue, 3 Dec 2024 16:11:38 +0700 Subject: [PATCH] wip --- .../app/components/ExplorerCard.tsx | 15 ++----- .../app/components/StakingCard.tsx | 40 +++++++++++++++++++ 2 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 explorer-nextjs/app/components/StakingCard.tsx diff --git a/explorer-nextjs/app/components/ExplorerCard.tsx b/explorer-nextjs/app/components/ExplorerCard.tsx index 341b60b3b5..676f5fd8c3 100644 --- a/explorer-nextjs/app/components/ExplorerCard.tsx +++ b/explorer-nextjs/app/components/ExplorerCard.tsx @@ -1,11 +1,4 @@ -import { - Card, - CardContent, - Typography, - Box, - IconButton, - Button, -} from "@mui/material"; +import { Card, CardContent, Typography, Box, Button } from "@mui/material"; import React, { FC, ReactElement, ReactEventHandler, useEffect } from "react"; import { ExplorerLineChart, IExplorerLineChartData } from "./ExplorerLineChart"; import { @@ -86,10 +79,10 @@ const CardTitlePrice = (props: ICardTitlePriceProps): React.ReactNode => { ); }; -interface ICardDataRowsProps { +export interface ICardDataRowsProps { rows: Array<{ key: string; value: string }>; } -const CardDataRows = (props: ICardDataRowsProps): React.ReactNode => { +export const CardDataRows = (props: ICardDataRowsProps): React.ReactNode => { const { rows } = props; return ( @@ -351,7 +344,7 @@ export const ExplorerCard: FC = ({ chat, button, }) => ( - + {overTitle && ( diff --git a/explorer-nextjs/app/components/StakingCard.tsx b/explorer-nextjs/app/components/StakingCard.tsx new file mode 100644 index 0000000000..9672964519 --- /dev/null +++ b/explorer-nextjs/app/components/StakingCard.tsx @@ -0,0 +1,40 @@ +import { Card, CardContent, Typography, Box, Button } from "@mui/material"; +import { ICardDataRowsProps } from "./ExplorerCard"; + +export interface IStakingCardProps { + title?: string; + titleCenter?: string; + paragraphCenter?: string; + closeButton?: { + onClick: () => void; + }; + addressInput?: boolean; + amountInput?: boolean; + dataRows?: ICardDataRowsProps; + blockExplorerLink?: string; + backButton?: { + onClick: () => void; + }; + nextButton?: { + onClick: () => void; + }; +} +export const StakingCard = (props: IStakingCardProps) => { + const { + title, + titleCenter, + closeButton, + paragraphCenter, + addressInput, + amountInput, + dataRows, + blockExplorerLink, + backButton, + nextButton, + } = props; + return ( + + + + ); +};