Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Minor UI fixes #189

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
}
Loading