-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove again TransactionDialog components cluster * add reusable Collapse * add reusable LabeledCopyablePublicKey * add BridgeFeeCollapse * simplify TransferDialog logic
- Loading branch information
1 parent
589851f
commit 457fd1a
Showing
6 changed files
with
107 additions
and
497 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
interface CollapseProps { | ||
title: React.ReactNode; | ||
children: React.ReactNode; | ||
className?: string; | ||
titleClassName?: string; | ||
contentClassName?: string; | ||
[key: string]: unknown; | ||
} | ||
|
||
export function Collapse({ title, children, className, titleClassName, contentClassName, ...rest }: CollapseProps) { | ||
return ( | ||
<div tabIndex={0} className={`collapse collapse-arrow ${className || ''}`} {...rest}> | ||
<input type="checkbox" /> | ||
<div className={`collapse-title ${titleClassName || ''}`}>{title}</div> | ||
<div className={`collapse-content ${contentClassName || ''}`}>{children}</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { CopyablePublicKey } from '../PublicKey/CopyablePublicKey'; | ||
|
||
interface AddressDisplayProps { | ||
label: string; | ||
publicKey: string; | ||
tenantName?: string; | ||
showMemo?: boolean; | ||
expectedStellarMemo?: string; | ||
} | ||
|
||
export const AddressDisplay: React.FC<AddressDisplayProps> = ({ label, publicKey }) => ( | ||
<div className="flex flex-row justify-between"> | ||
<div className="text-sm">{label}</div> | ||
<CopyablePublicKey inline={true} className="p-0 text-sm" variant="short" publicKey={publicKey} /> | ||
</div> | ||
); |
Oops, something went wrong.