-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wallet): rebrand connected dapp details (#2116)
* refactor: update styles for the Active Connection page * fix: rebrand also the list of connected accounts * fix: update import path * fix: remove double header * fix: add fallback for image Co-authored-by: evavirseda <[email protected]> * fix: add missing import --------- Co-authored-by: evavirseda <[email protected]> Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
- Loading branch information
1 parent
9b9c354
commit 3b6e380
Showing
9 changed files
with
197 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { type PermissionType } from '_src/shared/messaging/messages/payloads/permissions'; | ||
import { SummaryListItem } from './SummaryListItem'; | ||
import { Checkmark } from '@iota/ui-icons'; | ||
|
||
export interface DAppPermissionListProps { | ||
permissions: PermissionType[]; | ||
} | ||
|
||
const PERMISSION_TYPE_TO_TEXT: Record<PermissionType, string> = { | ||
viewAccount: 'Share wallet address', | ||
suggestTransactions: 'Suggest transactions to approve', | ||
}; | ||
|
||
export function DAppPermissionList({ permissions }: DAppPermissionListProps) { | ||
return ( | ||
<div className="flex flex-col gap-y-xs"> | ||
{permissions.map((permissionKey) => ( | ||
<SummaryListItem | ||
key={permissionKey} | ||
icon={<Checkmark className="h-5 w-5 text-neutral-10" />} | ||
text={PERMISSION_TYPE_TO_TEXT[permissionKey]} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
interface SummaryListItemProps { | ||
icon: React.ReactNode; | ||
text: string; | ||
} | ||
|
||
export function SummaryListItem({ icon, text }: SummaryListItemProps) { | ||
return ( | ||
<div className="flex flex-row items-center gap-x-sm"> | ||
{icon} | ||
<span className="text-body-md text-neutral-40">{text}</span> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Title, TitleSize } from '@iota/apps-ui-kit'; | ||
import { type ReactNode } from 'react'; | ||
|
||
interface SummaryPanelProps { | ||
title: string; | ||
body: ReactNode; | ||
} | ||
|
||
export function SummaryPanel({ title, body }: SummaryPanelProps) { | ||
return ( | ||
<div className="flex flex-col rounded-xl bg-neutral-96 pb-md"> | ||
<div className="flex flex-col gap-y-xs"> | ||
<div className="py-2.5"> | ||
<Title size={TitleSize.Small} title={title} /> | ||
</div> | ||
{body} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.