-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nft-dashboard): add top up modal
- Loading branch information
1 parent
fa6e28d
commit b337d0f
Showing
38 changed files
with
2,109 additions
and
1,697 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,49 @@ | ||
import { cardThemes } from '@app/constants/cardThemes'; | ||
import { PaymentCard } from '@app/interfaces/interfaces'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
export const getPaymentCards = (id: number): Promise<PaymentCard[]> => | ||
new Promise((res) => | ||
setTimeout( | ||
() => | ||
res([ | ||
{ | ||
name: 'Dean James', | ||
cvc: '144', | ||
expiry: '11/24', | ||
number: '4255 2003 0168 9006', | ||
focused: '', | ||
background: cardThemes[0].background, | ||
isEdit: false, | ||
}, | ||
{ | ||
name: 'Walker Alan', | ||
cvc: '179', | ||
expiry: '05/23', | ||
number: '5245 0017 2000 0164', | ||
focused: '', | ||
background: cardThemes[3].background, | ||
isEdit: false, | ||
}, | ||
{ | ||
name: 'Jackson Michael', | ||
cvc: '345', | ||
expiry: '12/22', | ||
number: '4255 1000 2046 8006', | ||
focused: '', | ||
background: cardThemes[5].background, | ||
isEdit: false, | ||
}, | ||
{ | ||
name: 'Christopher Johnson', | ||
cvc: '222', | ||
expiry: '09/24', | ||
number: '5205 0024 2535 5235', | ||
focused: '', | ||
background: cardThemes[4].background, | ||
isEdit: false, | ||
}, | ||
]), | ||
1500, | ||
), | ||
); |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
10 changes: 10 additions & 0 deletions
10
...mponents/nft-dashboard/Balance/components/TopUpBalanceButton/TopUpBalanceButton.styles.ts
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,10 @@ | ||
import { Button } from '@app/components/common/buttons/Button/Button'; | ||
import styled, { css } from 'styled-components'; | ||
|
||
export const TopUpButton = styled(Button)` | ||
${(props) => | ||
props.type === 'ghost' && | ||
css` | ||
color: var(--text-secondary-color); | ||
`}; | ||
`; |
17 changes: 17 additions & 0 deletions
17
src/components/nft-dashboard/Balance/components/TopUpBalanceButton/TopUpBalanceButton.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,17 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { useAppSelector } from '@app/hooks/reduxHooks'; | ||
import * as S from './TopUpBalanceButton.styles'; | ||
|
||
export const TopUpBalanceButton: React.FC<{ onClick: () => void }> = ({ onClick }) => { | ||
const { t } = useTranslation(); | ||
const { theme } = useAppSelector((state) => state.theme); | ||
|
||
console.log(theme); | ||
|
||
return ( | ||
<S.TopUpButton type={theme === 'dark' ? 'ghost' : 'primary'} block onClick={onClick}> | ||
{t('nft.topUpBalance')} | ||
</S.TopUpButton> | ||
); | ||
}; |
53 changes: 53 additions & 0 deletions
53
src/components/nft-dashboard/Balance/components/TopUpBalanceForm/TopUpBalanceForm.styles.ts
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,53 @@ | ||
import styled from 'styled-components'; | ||
import { RadioGroup } from '@app/components/common/Radio/Radio'; | ||
import { Typography } from 'antd'; | ||
import { FONT_SIZE } from '@app/styles/themes/constants'; | ||
|
||
export const ContentWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
`; | ||
|
||
export const BlockWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
`; | ||
|
||
export const Label = styled(Typography.Text)` | ||
color: var(--text-nft-light-color); | ||
font-size: ${FONT_SIZE.xs}; | ||
`; | ||
|
||
export const ButtonsWrapper = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
button { | ||
width: calc(100% / 3 - 0.2rem); | ||
margin: 0.2rem 0; | ||
} | ||
`; | ||
|
||
export const PaymentRadio = styled(RadioGroup)` | ||
display: block; | ||
.ant-radio-wrapper { | ||
display: flex; | ||
margin-right: 0; | ||
align-items: center; | ||
justify-content: space-between; | ||
flex-direction: row-reverse; | ||
gap: 2rem; | ||
&::after { | ||
display: none; | ||
} | ||
.ant-radio + span { | ||
padding: 0; | ||
} | ||
} | ||
`; |
Oops, something went wrong.