1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 19:08:21 +00:00

improve/add-empty-tip-when-no-file (#6760)

This commit is contained in:
Michael An
2024-09-12 14:03:29 +08:00
committed by GitHub
parent b6ae9eca80
commit 5bebec6aee
9 changed files with 73 additions and 33 deletions

View File

@@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
import { mediaUrl } from '../utils/constants';
import '../css/empty-tip.css';
function EmptyTip({ className, title, text, children }) {
function EmptyTip({ className = '', title, text, children }) {
return (
<div className='empty-tip'>
<div className={`empty-tip ${className}`}>
<img src={`${mediaUrl}img/no-items-tip.png`} alt="" width="100" height="100" className="no-items-img-tip" />
{title && <span className="empty-tip-title">{title}</span>}
{text && <span className="empty-tip-text">{text}</span>}