2019-06-10 09:30:10 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { mediaUrl } from '../utils/constants';
|
2024-08-20 03:19:11 +00:00
|
|
|
import '../css/empty-tip.css';
|
2019-06-10 09:30:10 +00:00
|
|
|
|
2024-09-12 06:03:29 +00:00
|
|
|
function EmptyTip({ className = '', title, text, children }) {
|
2024-08-20 03:19:11 +00:00
|
|
|
return (
|
2024-09-12 06:03:29 +00:00
|
|
|
<div className={`empty-tip ${className}`}>
|
2024-08-20 03:19:11 +00:00
|
|
|
<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>}
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
EmptyTip.propTypes = {
|
|
|
|
className: PropTypes.string,
|
|
|
|
title: PropTypes.string,
|
2025-02-17 03:53:56 +00:00
|
|
|
text: PropTypes.any,
|
2023-09-13 00:40:50 +00:00
|
|
|
children: PropTypes.any,
|
2020-03-10 04:00:31 +00:00
|
|
|
};
|
|
|
|
|
2019-06-10 09:30:10 +00:00
|
|
|
export default EmptyTip;
|