diff --git a/explorer-nextjs/package.json b/explorer-nextjs/package.json index ad310f4fd8..70ca03a524 100644 --- a/explorer-nextjs/package.json +++ b/explorer-nextjs/package.json @@ -16,7 +16,8 @@ "@mui/material-nextjs": "^6.1.9", "next": "15.0.3", "react": "19.0.0-rc-66855b96-20241106", - "react-dom": "19.0.0-rc-66855b96-20241106" + "react-dom": "19.0.0-rc-66855b96-20241106", + "react-world-flags": "^1.6.0" }, "devDependencies": { "@biomejs/biome": "1.9.4", diff --git a/explorer-nextjs/src/components/Cards/MonoCard.tsx b/explorer-nextjs/src/components/Cards/MonoCard.tsx index 2640557d47..02cd07b0b4 100644 --- a/explorer-nextjs/src/components/Cards/MonoCard.tsx +++ b/explorer-nextjs/src/components/Cards/MonoCard.tsx @@ -10,8 +10,8 @@ import type React from "react"; import type { FC, ReactElement } from "react"; import Flag from "react-world-flags"; import profileImagePlaceholder from "../../../public/profileImagePlaceholder.png"; -// import { Remark42Comments } from "../comments"; import { NymTokenSVG } from "../icons/NymTokenSVG"; +// import { Remark42Comments } from "../comments"; import { type ILineChartData, LineChart } from "../lineChart"; import { DynamicProgressBar, diff --git a/explorer-nextjs/src/components/icons/NymTokenSVG.tsx b/explorer-nextjs/src/components/icons/NymTokenSVG.tsx new file mode 100644 index 0000000000..947823a74b --- /dev/null +++ b/explorer-nextjs/src/components/icons/NymTokenSVG.tsx @@ -0,0 +1,38 @@ +import { useTheme } from "@mui/material/styles"; +import * as React from "react"; + +export const NymTokenSVG = () => { + const theme = useTheme(); + const color = theme.palette.text.primary; + return ( + + Nym Token Icon + + + + + + + + + + + ); +}; diff --git a/explorer-nextjs/src/components/progressBars/MultiSegmentProgressBar.tsx b/explorer-nextjs/src/components/progressBars/MultiSegmentProgressBar.tsx new file mode 100644 index 0000000000..455587b451 --- /dev/null +++ b/explorer-nextjs/src/components/progressBars/MultiSegmentProgressBar.tsx @@ -0,0 +1,35 @@ +import { Box } from "@mui/material"; +import type React from "react"; + +export interface MultiSegmentProgressBarProps { + values: { percentage: number; color: string }[]; // Array of percentage and color pairs + // Optional border radius, default is 4 + backgroundColor?: string; // Optional background color for the bar, default is light gray +} + +export const MultiSegmentProgressBar: React.FC< + MultiSegmentProgressBarProps +> = ({ values, backgroundColor = "#CAD6D7" }) => { + return ( + + {values.map((value) => ( + + ))} + + ); +}; diff --git a/explorer-nextjs/src/components/progressBars/StaticProgressBar.tsx b/explorer-nextjs/src/components/progressBars/StaticProgressBar.tsx new file mode 100644 index 0000000000..e68990970a --- /dev/null +++ b/explorer-nextjs/src/components/progressBars/StaticProgressBar.tsx @@ -0,0 +1,29 @@ +import Box from "@mui/material/Box"; +import LinearProgress from "@mui/material/LinearProgress"; +import * as React from "react"; + +export interface IStaticProgressBarProps { + color: string; + value: number; +} + +export const StaticProgressBar = (props: IStaticProgressBarProps) => { + const { color, value } = props; + + return ( + + + + ); +};