diff options
author | Jenny Pollack <jennypollack3@gmail.com> | 2018-06-08 05:10:56 +0800 |
---|---|---|
committer | Jenny Pollack <jennypollack3@gmail.com> | 2018-06-08 05:10:56 +0800 |
commit | e7c2710a55a49b8a266fa61cfed1caecc2623de7 (patch) | |
tree | c8553c02b63b10626ef561ca0bfe26c560b295d6 /ui/app/components/send_/send-header/send-header.component.js | |
parent | fd8bcc9cb1b9f9c1cc5ef48eda4952182b23e499 (diff) | |
parent | c0d2dab28b4083ee3ef65b6b561e28c811c6773d (diff) | |
download | tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.gz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.bz2 tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.lz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.xz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.zst tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.zip |
Merge branch 'develop' into save-brave
Diffstat (limited to 'ui/app/components/send_/send-header/send-header.component.js')
-rw-r--r-- | ui/app/components/send_/send-header/send-header.component.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ui/app/components/send_/send-header/send-header.component.js b/ui/app/components/send_/send-header/send-header.component.js new file mode 100644 index 000000000..5f6617fce --- /dev/null +++ b/ui/app/components/send_/send-header/send-header.component.js @@ -0,0 +1,34 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import PageContainerHeader from '../../page-container/page-container-header' +import { DEFAULT_ROUTE } from '../../../routes' + +export default class SendHeader extends Component { + + static propTypes = { + clearSend: PropTypes.func, + history: PropTypes.object, + titleKey: PropTypes.string, + subtitleParams: PropTypes.array, + }; + + onClose () { + this.props.clearSend() + this.props.history.push(DEFAULT_ROUTE) + } + + render () { + return ( + <PageContainerHeader + onClose={() => this.onClose()} + subtitle={this.context.t(...this.props.subtitleParams)} + title={this.context.t(this.props.titleKey)} + /> + ) + } + +} + +SendHeader.contextTypes = { + t: PropTypes.func, +} |