-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(Swap): style confirmation modal
- Loading branch information
plondon
committed
Mar 24, 2019
1 parent
da35adb
commit 46510ea
Showing
22 changed files
with
610 additions
and
377 deletions.
There are no files selected for viewing
Binary file modified
BIN
+88 Bytes
(100%)
packages/blockchain-info-components/src/Fonts/Icomoon/fonts/icomoon.eot
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
packages/blockchain-info-components/src/Fonts/Icomoon/fonts/icomoon.ttf
Binary file not shown.
Binary file modified
BIN
+88 Bytes
(100%)
packages/blockchain-info-components/src/Fonts/Icomoon/fonts/icomoon.woff
Binary file not shown.
626 changes: 422 additions & 204 deletions
626
packages/blockchain-info-components/src/Fonts/Icomoon/selection.json
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
File renamed without changes.
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
File renamed without changes.
72 changes: 72 additions & 0 deletions
72
packages/blockchain-wallet-v4-frontend/src/modals/Exchange/ExchangeConfirm/index.js
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,72 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { bindActionCreators, compose } from 'redux' | ||
import { connect } from 'react-redux' | ||
|
||
import modalEnhancer from 'providers/ModalEnhancer' | ||
import { actions, model } from 'data' | ||
import { getData } from './selectors' | ||
import { | ||
BlockchainLoader, | ||
Modal, | ||
ModalBody, | ||
ModalHeader | ||
} from 'blockchain-info-components' | ||
import DataError from 'components/DataError' | ||
import ExchangeConfirm from './template' | ||
|
||
const { CONFIRM_MODAL } = model.components.exchange | ||
|
||
const Loader = styled(BlockchainLoader)` | ||
align-self: center; | ||
margin: 50px auto; | ||
` | ||
const Body = styled(ModalBody)` | ||
padding-top: 0px; | ||
` | ||
const Header = styled(ModalHeader)` | ||
padding: 20px 20px 0 0; | ||
border-bottom: 0px; | ||
` | ||
class ExchangeConfirmContainer extends React.PureComponent { | ||
render () { | ||
const { data, actions, close, position, total } = this.props | ||
const ConfirmCata = data.cata({ | ||
Success: value => ( | ||
<ExchangeConfirm | ||
{...value} | ||
close={close} | ||
onSubmit={actions.confirmExchange} | ||
/> | ||
), | ||
Failure: message => <DataError message={message} />, | ||
Loading: () => <Loader width='100px' height='100px' />, | ||
NotAsked: () => <Loader width='100px' height='100px' /> | ||
}) | ||
|
||
return ( | ||
<Modal size='small' total={total} position={position}> | ||
<Header onClose={close} /> | ||
<Body>{ConfirmCata}</Body> | ||
</Modal> | ||
) | ||
} | ||
} | ||
|
||
const mapStateToProps = state => ({ | ||
data: getData(state) | ||
}) | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
actions: bindActionCreators(actions.components.exchange, dispatch) | ||
}) | ||
|
||
const enhance = compose( | ||
modalEnhancer(CONFIRM_MODAL), | ||
connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
) | ||
) | ||
|
||
export default enhance(ExchangeConfirmContainer) |
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.