You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
854 B

  1. import PureRenderMixin from 'react-addons-pure-render-mixin';
  2. import { FormattedMessage } from 'react-intl';
  3. const outerStyle = {
  4. padding: '15px',
  5. fontSize: '16px',
  6. background: '#2f3441',
  7. flex: '0 0 auto',
  8. cursor: 'pointer',
  9. color: '#2b90d9'
  10. };
  11. const iconStyle = {
  12. display: 'inline-block',
  13. marginRight: '5px'
  14. };
  15. const ColumnBackButton = React.createClass({
  16. contextTypes: {
  17. router: React.PropTypes.object
  18. },
  19. mixins: [PureRenderMixin],
  20. handleClick () {
  21. this.context.router.goBack();
  22. },
  23. render () {
  24. return (
  25. <div onClick={this.handleClick} style={outerStyle} className='column-back-button'>
  26. <i className='fa fa-fw fa-chevron-left' style={iconStyle} />
  27. <FormattedMessage id='column_back_button.label' defaultMessage='Back' />
  28. </div>
  29. );
  30. }
  31. });
  32. export default ColumnBackButton;