-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9bd157
commit a0e752c
Showing
3 changed files
with
37 additions
and
49 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
37 changes: 17 additions & 20 deletions
37
src/app/pages/bitcoin-contract-request/components/bitcoin-contract-request-header.tsx
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 |
---|---|---|
@@ -1,40 +1,37 @@ | ||
import { memo } from 'react'; | ||
|
||
import { Flex } from '@stacks/ui'; | ||
import { BitcoinContractRequestSelectors } from '@tests/selectors/bitcoin-contract-request.selectors'; | ||
import { Flex, styled } from 'leather-styles/jsx'; | ||
|
||
import { Favicon } from '@app/components/favicon'; | ||
import { Flag } from '@app/components/layout/flag'; | ||
import { Caption, Title } from '@app/components/typography'; | ||
|
||
interface BitcoinContractRequestHeaderBaseProps { | ||
counterpartyWalletIcon: string; | ||
counterpartyWalletName: string; | ||
} | ||
|
||
function BitcoinContractRequestHeaderBase({ | ||
export function BitcoinContractRequestHeader({ | ||
counterpartyWalletName, | ||
counterpartyWalletIcon, | ||
}: BitcoinContractRequestHeaderBaseProps) { | ||
const caption = `${counterpartyWalletName} is requesting you accept this offer`; | ||
const caption = `Requested by ${counterpartyWalletName}`; | ||
|
||
return ( | ||
<Flex flexDirection="column" my="loose" width="100%"> | ||
<Title fontSize={4} fontWeight="bold" mb="base"> | ||
Lock Bitcoin | ||
</Title> | ||
<Flex flexDirection="column" my="space.05" width="100%"> | ||
<styled.h1 mb="space.04" textStyle="heading.03"> | ||
Lock | ||
<br /> | ||
Bitcoin | ||
</styled.h1> | ||
<styled.p mb="space.04" textStyle="label.01"> | ||
By signing the contract YOU AGREE TO LOCK YOUR BITCOIN with {counterpartyWalletName} into a | ||
contract where it will remain until a triggering event will release it. | ||
</styled.p> | ||
{caption && ( | ||
<Flag | ||
align="middle" | ||
img={<img src={counterpartyWalletIcon} height="32px" width="32px" />} | ||
pl="tight" | ||
> | ||
<Caption data-testid={BitcoinContractRequestSelectors.BitcoinContractOfferorText}> | ||
<Flag align="middle" img={<Favicon origin={counterpartyWalletIcon} />} pl="tight"> | ||
<styled.span textStyle="label.02" wordBreak="break-word"> | ||
{caption} | ||
</Caption> | ||
</styled.span> | ||
</Flag> | ||
)} | ||
</Flex> | ||
); | ||
} | ||
|
||
export const BitcoinContractRequestHeader = memo(BitcoinContractRequestHeaderBase); |
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