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

36 lines
873 B
JavaScript
Raw Normal View History

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