-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6360 from blockchain/ach
fix(warn): add message to confirm deposit
- Loading branch information
Showing
3 changed files
with
89 additions
and
15 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
48 changes: 48 additions & 0 deletions
48
...chain-wallet-v4-frontend/src/modals/Brokerage/Banks/Deposit/Confirm/MoreInfoContainer.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Padding, Button, Text } from '@blockchain-com/constellation' | ||
import { FlyoutWrapper } from 'components/Flyout' | ||
import React, { FC, ReactNode, useState } from 'react' | ||
import styled from 'styled-components' | ||
|
||
const Container = styled(FlyoutWrapper)` | ||
display: flex; | ||
flex-direction: column; | ||
padding-top: 30px; | ||
height: 100%; | ||
border-top: 1px solid ${(props) => props.theme.grey000}; | ||
` | ||
|
||
export const MoreInfoContainer: FC<{ teaser: ReactNode; text: ReactNode }> = ({ teaser, text }) => { | ||
const [isOpen, setIsOpen] = useState(false) | ||
const handleClick = (e) => { | ||
e.preventDefault() | ||
if (isOpen) { | ||
setIsOpen(false) | ||
} else { | ||
setIsOpen(true) | ||
} | ||
} | ||
return ( | ||
<Container> | ||
<Padding bottom={1}> | ||
<Text as='p' variant='caption1'> | ||
{teaser} | ||
</Text> | ||
</Padding> | ||
{isOpen && ( | ||
<Text as='p' variant='caption1'> | ||
{text} | ||
</Text> | ||
)} | ||
<Button | ||
as='button' | ||
onClick={handleClick} | ||
size='small' | ||
state='initial' | ||
text={isOpen ? 'Read Less' : 'Read More'} | ||
type='button' | ||
variant='minimal' | ||
width='auto' | ||
/> | ||
</Container> | ||
) | ||
} |
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