diff --git a/src/components/PercentageGauge.tsx b/src/components/PercentageGauge.tsx new file mode 100644 index 0000000..23af8f7 --- /dev/null +++ b/src/components/PercentageGauge.tsx @@ -0,0 +1,34 @@ +import React from "react"; + +type PercentageGaugeProps = { + perc: number; + bgFull: string; + bgPerc: string; + textPerc: string; +}; + +const PercentageGauge: React.FC = ({ + perc, + bgFull, + bgPerc, + textPerc, +}) => ( +
+
+
+
+
+
+
+
+ {perc}% +
+
+); + +export default React.memo(PercentageGauge); diff --git a/src/transaction/RewardSplit.tsx b/src/transaction/RewardSplit.tsx index a9ffd85..9005d12 100644 --- a/src/transaction/RewardSplit.tsx +++ b/src/transaction/RewardSplit.tsx @@ -1,12 +1,9 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faAngleRight, - faBurn, - faCoins, -} from "@fortawesome/free-solid-svg-icons"; +import { faBurn, faCoins } from "@fortawesome/free-solid-svg-icons"; import FormattedBalance from "../components/FormattedBalance"; import { TransactionData } from "../types"; +import PercentageGauge from "../components/PercentageGauge"; type RewardSplitProps = { txData: TransactionData; @@ -20,49 +17,43 @@ const RewardSplit: React.FC = ({ txData }) => { 100; return ( -
-
-
-
-
- {burntPerc}% -
+
+
+ +
+ + + + + + + + {" "} + Ether + +
-
-
- - - - - - + +
+ + + + + + Ether + - - - - {" "} - Ether - - -
-
- - - - - - - - - Ether - - +
);