1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-16 08:16:55 +00:00
seahub/frontend/src/components/empty-tip.js

27 lines
657 B
JavaScript
Raw Normal View History

2019-06-10 09:30:10 +00:00
import React from 'react';
import PropTypes from 'prop-types';
import { mediaUrl } from '../utils/constants';
const propTypes = {
forDialog: PropTypes.bool,
children: PropTypes.any,
className: PropTypes.string
};
2019-06-10 09:30:10 +00:00
class EmptyTip extends React.Component {
render() {
const { className } = this.props;
2019-06-10 09:30:10 +00:00
return (
<div className={this.props.forDialog ? `${className || 'text-center mt-8'}` : 'empty-tip'}>
2019-06-12 10:37:11 +00:00
<img src={`${mediaUrl}img/no-items-tip.png`} alt="" width="100" height="100" className="no-items-img-tip" />
2019-06-10 09:30:10 +00:00
{this.props.children}
</div>
);
}
}
EmptyTip.propTypes = propTypes;
2019-06-10 09:30:10 +00:00
export default EmptyTip;