| 1 |
import { |
| 2 |
Empty, |
| 3 |
EmptyDescription, |
| 4 |
EmptyHeader, |
| 5 |
EmptyMedia, |
| 6 |
EmptyTitle, |
| 7 |
} from '@/components/ui/empty'; |
| 8 |
import { cn } from '@/lib/utils'; |
| 9 |
import { __ } from '@wordpress/i18n'; |
| 10 |
import { TriangleAlert } from 'lucide-react'; |
| 11 |
|
| 12 |
const EmptyData = ({ title, description }) => { |
| 13 |
return ( |
| 14 |
<Empty |
| 15 |
className={cn( |
| 16 |
'disco:bg-white disco:rounded-xl disco:border disco:border-[#e5e7eb] disco:overflow-hidden disco:py-10' |
| 17 |
)} |
| 18 |
> |
| 19 |
<EmptyHeader> |
| 20 |
<EmptyMedia variant="icon"> |
| 21 |
<TriangleAlert className="disco:size-8 disco:text-red-400" /> |
| 22 |
</EmptyMedia> |
| 23 |
<EmptyTitle> |
| 24 |
{__(`${title} Not Found!`, 'disco') || 'No Data Found!'} |
| 25 |
</EmptyTitle> |
| 26 |
<EmptyDescription>{__(description, 'disco')}</EmptyDescription> |
| 27 |
</EmptyHeader> |
| 28 |
</Empty> |
| 29 |
); |
| 30 |
}; |
| 31 |
|
| 32 |
export default EmptyData; |
| 33 |
|