Skip to content

Commit

Permalink
feat: wallet settings revamp (#3133)
Browse files Browse the repository at this point in the history
* feat: wallet settings revamp
  • Loading branch information
pavanjoshi914 authored May 10, 2024
1 parent 31fdee7 commit 8cf20b9
Show file tree
Hide file tree
Showing 29 changed files with 466 additions and 481 deletions.
7 changes: 3 additions & 4 deletions src/app/components/AccountDetailLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ function AccountDetailLayout() {
const navigate = useNavigate();
const isRoot = useMatch("accounts/:id");
const { accounts } = useAccounts();
const { t } = useTranslation("translation", {
keyPrefix: "accounts.account_view",
});

const { t: tCommon } = useTranslation("common");
const { id } = useParams() as { id: string };

function back() {
Expand Down Expand Up @@ -50,7 +49,7 @@ function AccountDetailLayout() {
</h2>
<span>/</span>
<span className="text-ellipsis whitespace-nowrap overflow-hidden">
{t("title1")}
{tCommon("wallet_settings")}
</span>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/AccountMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function AccountMenu({ showOptions = true }: Props) {
}}
>
<PopiconsWalletLine className="w-4 h-4 mr-2 shrink-0" />
{t("options.account.wallet_settings")}
{tCommon("wallet_settings")}
</Menu.ItemButton>
{(isAlbyLNDHubAccount(
authAccount?.alias,
Expand Down
5 changes: 4 additions & 1 deletion src/app/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type Props = React.ButtonHTMLAttributes<HTMLButtonElement> & {
halfWidth?: boolean;
label: string;
icon?: React.ReactNode;
iconRight?: React.ReactNode;
primary?: boolean;
destructive?: boolean;
outline?: boolean;
Expand All @@ -26,6 +27,7 @@ const Button = forwardRef(
disabled,
direction = "row",
icon,
iconRight,
fullWidth = false,
halfWidth = false,
primary = false,
Expand Down Expand Up @@ -61,7 +63,7 @@ const Button = forwardRef(
"hover:bg-gray-50 dark:hover:bg-surface-16dp",
disabled ? "cursor-default opacity-60" : "cursor-pointer",
flex && "flex-1",
"inline-flex justify-center items-center font-medium bg-origin-border shadow rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary transition duration-150",
"inline-flex justify-center items-center gap-1 font-medium bg-origin-border shadow rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary transition duration-150",
!!className && className
)}
onClick={onClick}
Expand All @@ -74,6 +76,7 @@ const Button = forwardRef(
)}
{icon}
{label}
{iconRight}
</button>
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/app/components/Setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function Setting({ title, subtitle, children, inline }: Props) {
)}
>
<div>
<span className="text-black dark:text-white font-medium">{title}</span>
<span className="text-gray-800 dark:text-white font-medium">
{title}
</span>
<p className="text-gray-600 mr-1 dark:text-neutral-400 text-sm">
{subtitle}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/form/TextField/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Input from "../Input";

export type Props = {
label: string;
label: string | React.ReactNode;
hint?: string;
suffix?: string;
endAdornment?: React.ReactNode;
Expand Down
Loading

0 comments on commit 8cf20b9

Please sign in to comment.