Skip to content

Commit

Permalink
updated overlay balance
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed Apr 8, 2024
1 parent 9a34cfb commit 60c6628
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export function RepTokensDemo() {
tokens={faucetTokens}
components={["Balance", "Image"]}
isBalanceOverlayed={true}
size="xs"
preChildren={<p className="text-center text-4xl bg-base-200 rounded-lg my-1">Faucet</p>}
postChildren={
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const overlaidCardSizeMap = {

const formatNumber = (n: number) => {
if (n < 1e3) return n;
if (n >= 1e3 && n < 1e6) return +(n / 1e3).toFixed(1) + "K";
if (n >= 1e6 && n < 1e9) return +(n / 1e6).toFixed(1) + "M";
if (n >= 1e9 && n < 1e12) return +(n / 1e9).toFixed(1) + "B";
if (n >= 1e12) return +(n / 1e12).toFixed(1) + "T";
if (n >= 1e3 && n < 1e6) return +(n / 1e3).toFixed(2) + "K";
if (n >= 1e6 && n < 1e9) return +(n / 1e6).toFixed(2) + "M";
if (n >= 1e9 && n < 1e12) return +(n / 1e9).toFixed(2) + "B";
if (n >= 1e12) return +(n / 1e12).toFixed(2) + "T";

return "";
};
Expand Down Expand Up @@ -57,7 +57,7 @@ export const StylizedBalanceCard = ({ value, isOverlay, size = "base" }: Balance
} else if (output.length === 4) {
result = "text-lg";
} else if (output.length === 5) {
result = "text-md";
result = "text-sm";
} else if (output.length === 6) {
result = "text-sm";
}
Expand Down

0 comments on commit 60c6628

Please sign in to comment.