2017-05-02 20:04:16 -04:00
|
|
|
import React from 'react';
|
2017-01-02 19:15:42 -05:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-04-21 14:05:35 -04:00
|
|
|
import PropTypes from 'prop-types';
|
2017-01-02 19:15:42 -05:00
|
|
|
|
2017-04-21 14:05:35 -04:00
|
|
|
class ColumnBackButtonSlim extends React.PureComponent {
|
2017-01-02 19:15:42 -05:00
|
|
|
|
2017-04-21 14:05:35 -04:00
|
|
|
constructor (props, context) {
|
|
|
|
super(props, context);
|
|
|
|
this.handleClick = this.handleClick.bind(this);
|
|
|
|
}
|
2017-01-02 19:15:42 -05:00
|
|
|
|
|
|
|
handleClick () {
|
|
|
|
this.context.router.push('/');
|
2017-04-21 14:05:35 -04:00
|
|
|
}
|
2017-01-02 19:15:42 -05:00
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
2017-04-22 22:26:55 -04:00
|
|
|
<div className='column-back-button--slim'>
|
2017-04-23 08:18:58 -04:00
|
|
|
<div role='button' tabIndex='0' onClick={this.handleClick} className='column-back-button column-back-button--slim-button'>
|
2017-04-22 22:26:55 -04:00
|
|
|
<i className='fa fa-fw fa-chevron-left column-back-button__icon' />
|
2017-01-02 19:15:42 -05:00
|
|
|
<FormattedMessage id='column_back_button.label' defaultMessage='Back' />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-04-21 14:05:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnBackButtonSlim.contextTypes = {
|
|
|
|
router: PropTypes.object
|
|
|
|
};
|
2017-01-02 19:15:42 -05:00
|
|
|
|
2017-01-30 09:22:04 -05:00
|
|
|
export default ColumnBackButtonSlim;
|