1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-19 01:29:05 +00:00
seahub/frontend/src/components/logo.js

36 lines
853 B
JavaScript
Raw Normal View History

2018-09-12 09:01:48 +00:00
import React from 'react';
2018-10-16 10:19:51 +00:00
import PropTypes from 'prop-types';
import { siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from '../utils/constants';
2018-09-12 09:01:48 +00:00
2018-10-16 10:19:51 +00:00
const propTypes = {
onCloseSidePanel: PropTypes.func.isRequired,
2018-09-12 09:01:48 +00:00
};
class Logo extends React.Component {
closeSide = () => {
this.props.onCloseSidePanel();
}
render() {
return (
2018-10-16 10:19:51 +00:00
<div className="top-logo">
<a href={siteRoot} id="logo">
<img src={mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" />
</a>
<a
2018-12-28 03:12:24 +00:00
className="sf2-icon-x1 sf-popover-close side-panel-close action-icon d-md-none"
2018-10-16 10:19:51 +00:00
onClick={this.closeSide}
title="Close"
aria-label="Close"
>
</a>
</div>
2018-09-12 09:01:48 +00:00
);
}
}
2018-10-16 10:19:51 +00:00
Logo.propTypes = propTypes;
2018-09-12 09:01:48 +00:00
export default Logo;