forked from Koniverse/SubWallet-Extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/koni/dev/issue-174'…
… into story-protocol-od-dev
- Loading branch information
Showing
15 changed files
with
427 additions
and
102 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
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
76 changes: 76 additions & 0 deletions
76
...ion-koni-ui/src/Popup/Confirmations/variants/Transaction/variants/MintNftConfirmation.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,76 @@ | ||
// Copyright 2019-2022 @subwallet/extension-koni-ui authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { SWTransactionResult } from '@subwallet/extension-base/services/transaction-service/types'; | ||
import { useTranslation } from '@subwallet/extension-koni-ui/hooks'; | ||
import { AlertDialogProps, Theme, ThemeProps } from '@subwallet/extension-koni-ui/types'; | ||
import { toShort } from '@subwallet/extension-koni-ui/utils'; | ||
import { Field, Icon, PageIcon } from '@subwallet/react-ui'; | ||
import CN from 'classnames'; | ||
import { CheckCircle } from 'phosphor-react'; | ||
import React from 'react'; | ||
import styled, { useTheme } from 'styled-components'; | ||
|
||
export interface BaseTransactionConfirmationProps extends ThemeProps { | ||
transaction: SWTransactionResult; | ||
openAlert: (alertProps: AlertDialogProps) => void; | ||
closeAlert: VoidFunction; | ||
} | ||
|
||
const Component: React.FC<BaseTransactionConfirmationProps> = (props: BaseTransactionConfirmationProps) => { | ||
const { className, transaction } = props; | ||
|
||
const { t } = useTranslation(); | ||
const { token } = useTheme() as Theme; | ||
|
||
return ( | ||
<div className={CN(className)}> | ||
<div className='page-icon-overide'> | ||
<PageIcon | ||
color='#000' | ||
iconProps={{ | ||
phosphorIcon: CheckCircle, | ||
weight: 'fill' | ||
}} | ||
/> | ||
</div> | ||
<div className='__congratulation-text'> | ||
{t('You’re minting the Koni Story badge with this account')} | ||
</div> | ||
<Field | ||
className={'__address-field'} | ||
content={toShort(transaction.address, 10, 16)} | ||
suffix={( | ||
<Icon | ||
iconColor={token.colorSuccess} | ||
phosphorIcon={CheckCircle} | ||
size='sm' | ||
weight='fill' | ||
/> | ||
)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
const MintNftConfirmation = styled(Component)<BaseTransactionConfirmationProps>(({ theme: { token } }: BaseTransactionConfirmationProps) => { | ||
return { | ||
background: 'linear-gradient(117deg, #FFD8E6 9.05%, #BCEBFF 91.43%)', | ||
borderRadius: 24, | ||
display: 'flex', | ||
gap: token.size, | ||
textAlign: 'center', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
padding: '24px 20px', | ||
|
||
'.__congratulation-text': { | ||
fontSize: token.fontSizeSM, | ||
fontWeight: token.bodyFontWeight, | ||
lineHeight: token.lineHeightSM, | ||
color: token.colorTextDark1 | ||
} | ||
}; | ||
}); | ||
|
||
export default MintNftConfirmation; |
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.