Skip to content

Commit

Permalink
feat: rebrand unlock button (#2194)
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda authored Sep 3, 2024
1 parent c0cc650 commit e04f807
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions apps/wallet/src/ui/app/components/accounts/UnlockAccountButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

import { type SerializedUIAccount } from '_src/background/accounts/Account';

import { Button } from '../../shared/ButtonUI';
import { useUnlockAccount } from './UnlockAccountContext';
import { Button, ButtonType } from '@iota/apps-ui-kit';

export interface UnlockAccountButtonProps {
account: SerializedUIAccount;
Expand All @@ -14,12 +13,19 @@ export interface UnlockAccountButtonProps {

export function UnlockAccountButton({
account,
title = 'Unlock Account',
title = 'Unlock your Account',
}: UnlockAccountButtonProps) {
const { isPasswordUnlockable } = account;
const { unlockAccount } = useUnlockAccount();

if (isPasswordUnlockable) {
return <Button text={title} onClick={() => unlockAccount(account)} />;
return (
<Button
text={title}
onClick={() => unlockAccount(account)}
type={ButtonType.Secondary}
fullWidth
/>
);
}
}

0 comments on commit e04f807

Please sign in to comment.