Skip to content

Commit

Permalink
fix: Minor UI fixes (#189)
Browse files Browse the repository at this point in the history
Co-authored-by: Yashvardhan Jagnani <[email protected]>
  • Loading branch information
karanpargal and jagnani73 authored Jun 7, 2024
1 parent ee59c03 commit 6226be3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 50 deletions.
7 changes: 2 additions & 5 deletions src/components/Atoms/TokenAvatar/TokenAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useRef } from "react";
import { type TokenAvatarProps } from "@/utils/types/atoms.types";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { useGoldRush } from "@/utils/store";

const svgCache = new Map();

Expand Down Expand Up @@ -69,11 +70,7 @@ export const TokenAvatar: React.FC<TokenAvatarProps> = ({
).documentElement;

const paths = svg.querySelectorAll("path");
const fillColor = document.documentElement.classList.contains(
"dark"
)
? "white"
: "black";
const fillColor = "currentColor";
paths.forEach((path) => {
path.style.fill = fillColor;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ export const TransactionsList: React.FC<TransactionsListProps> = ({
),
cell: ({ row }) => (
<div>
{Number(row.original.value) /
Math.pow(
10,
row.original.gas_metadata.contract_decimals
)}{" "}
{calculatePrettyBalance(
row.original.value ?? 0,
row.original.gas_metadata.contract_decimals,
true,
4
)}{" "}
{row.original.gas_metadata.contract_ticker_symbol}
<p className="text-xs opacity-80">
{row.original.pretty_value_quote}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Table = forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
<div className="relative w-full overflow-auto rounded border border-secondary-light dark:border-secondary-dark">
<div className="relative w-full overflow-auto whitespace-nowrap rounded border border-secondary-light dark:border-secondary-dark">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
Expand Down
13 changes: 8 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// * INFO: components
export * from "./components/Atoms";
export * from "./components/Molecules";
export * from "./components/Organisms";

export { GoldRushProvider, useGoldRush } from "./utils/store";
/**
* @deprecated This hook is deprecated. Please use useGoldRush instead.
*/
export { useGoldRush as useCovalent } from "./utils/store";

// * INFO: types
export * from "./utils/types/atoms.types";
export * from "./utils/types/molecules.types";
export * from "./utils/types/organisms.types";
export * from "./utils/types/shared.types";
export * from "./utils/types/store.types";
34 changes: 0 additions & 34 deletions src/utils/types/store.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,4 @@ export interface GoldRushProviderProps {
children: React.ReactNode;
apikey: string;
newTheme?: Partial<GoldRushThemeType>;
/**
* @deprecated `mode` is deprecated as support will be removed in the upcoming releases. Use `newTheme.mode` instead.
*/
mode?: GoldRushThemeMode;
/**
* @deprecated `theme` is deprecated as support will be removed in the upcoming releases. Use `newTheme.style` instead.
*/
theme?: "classic" | "neo";
/**
* @deprecated `border_radius` is deprecated as support will be removed in the upcoming releases. Use `newTheme.borderRadius` instead.
*/
border_radius?: "none" | "small" | "medium" | "large" | "full";
/**
* @deprecated `color` is deprecated as support will be removed in the upcoming releases. Use `newTheme.colors` instead.
*/
color?:
| "slate"
| "stone"
| "red"
| "orange"
| "amber"
| "yellow"
| "lime"
| "green"
| "emerald"
| "cyan"
| "sky"
| "blue"
| "indigo"
| "violet"
| "purple"
| "fuchsia"
| "pink"
| "rose";
}

0 comments on commit 6226be3

Please sign in to comment.