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.

44 lines
938 B

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