2019-10-28 20:20:41 +01:00
|
|
|
import styled from '@emotion/styled';
|
|
|
|
import React from 'react';
|
2020-02-28 18:12:10 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2019-10-28 20:20:41 +01:00
|
|
|
|
|
|
|
import { colorsRaw } from './styles.js';
|
|
|
|
import Icon from './Icon';
|
|
|
|
|
|
|
|
const GoBackButtonStyle = styled.a`
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
margin-top: 50px;
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const ButtonText = styled.p`
|
|
|
|
color: ${colorsRaw.gray};
|
|
|
|
margin: 0 10px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default class GoBackButton extends React.Component {
|
2020-02-28 18:12:10 +08:00
|
|
|
static propTypes = {
|
|
|
|
href: PropTypes.string.isRequired,
|
|
|
|
t: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
2019-10-28 20:20:41 +01:00
|
|
|
render() {
|
2020-02-28 18:12:10 +08:00
|
|
|
const { href, t } = this.props;
|
|
|
|
|
2019-10-28 20:20:41 +01:00
|
|
|
return (
|
2020-02-28 18:12:10 +08:00
|
|
|
<GoBackButtonStyle href={href}>
|
2019-10-28 20:20:41 +01:00
|
|
|
<Icon type="arrow" size="small" />
|
2020-02-28 18:12:10 +08:00
|
|
|
<ButtonText>{t('ui.default.goBackToSite')}</ButtonText>
|
2019-10-28 20:20:41 +01:00
|
|
|
</GoBackButtonStyle>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|