From 11089be171c91346eca4c8a78afcc03a3cf8b5ec Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 08:25:33 -0300 Subject: [PATCH] Add percentage position component --- src/components/PercentagePosition.tsx | 23 +++++++++++++++++++++++ src/transaction/Details.tsx | 14 ++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 src/components/PercentagePosition.tsx diff --git a/src/components/PercentagePosition.tsx b/src/components/PercentagePosition.tsx new file mode 100644 index 0000000..c3efe8e --- /dev/null +++ b/src/components/PercentagePosition.tsx @@ -0,0 +1,23 @@ +import React from "react"; + +type PercentagePositionProps = { + perc: number; +}; + +const PercentagePosition: React.FC = ({ perc }) => ( +
+
+
+
+
+
+
+
+
+
+); + +export default React.memo(PercentagePosition); diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 25dddb5..7374a29 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -24,6 +24,7 @@ import { TransactionData, InternalOperation } from "../types"; import PercentageBar from "../components/PercentageBar"; import ExternalLink from "../components/ExternalLink"; import RelativePosition from "../components/RelativePosition"; +import PercentagePosition from "../components/PercentagePosition"; type DetailsProps = { txData: TransactionData; @@ -231,10 +232,15 @@ const Details: React.FC = ({ N/A {txData.nonce} - +
+ + +