1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-15 16:04:01 +00:00
seahub/frontend/src/components/logo.js
Michael An c41407f783
12.0 change app structure (#6335)
* 01 change app structure

* 02 change setting page

* 03 optimize header style

* 04 change app mobile side panel logo
2024-07-11 17:45:30 +08:00

39 lines
998 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from '../utils/constants';
const propTypes = {
onCloseSidePanel: PropTypes.func,
showCloseSidePanelIcon: PropTypes.bool,
};
class Logo extends React.Component {
closeSide = () => {
this.props.onCloseSidePanel();
};
render() {
return (
<div className='top-logo'>
<a href={siteRoot} id="logo">
<img src={logoPath.indexOf('image-view') != -1 ? logoPath : mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" />
</a>
{this.props.showCloseSidePanelIcon &&
<a
className="sf2-icon-x1 sf-popover-close side-panel-close action-icon d-md-none"
onClick={this.closeSide}
title="Close"
aria-label="Close"
>
</a>
}
</div>
);
}
}
Logo.propTypes = propTypes;
export default Logo;