2025-10-12 00:40:39 +03:00
|
|
|
import React from "react";
|
|
|
|
|
import { Button } from "../ui/button";
|
|
|
|
|
import Heading from "../ui/heading";
|
2025-10-20 16:03:22 +03:00
|
|
|
import { Link } from "react-router-dom";
|
2025-10-12 00:40:39 +03:00
|
|
|
|
|
|
|
|
type EmptyCardProps = {
|
|
|
|
|
icon: React.ReactNode;
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
buttonText?: string;
|
2025-10-20 16:03:22 +03:00
|
|
|
link?: string;
|
2025-10-12 00:40:39 +03:00
|
|
|
};
|
|
|
|
|
export function EmptyCard({
|
|
|
|
|
icon,
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
buttonText,
|
2025-10-20 16:03:22 +03:00
|
|
|
link,
|
2025-10-12 00:40:39 +03:00
|
|
|
}: EmptyCardProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col items-center gap-2">
|
|
|
|
|
{icon}
|
|
|
|
|
<Heading as="h4">{title}</Heading>
|
2025-10-20 16:03:22 +03:00
|
|
|
<div className="mb-3 text-secondary-foreground">{description}</div>
|
2025-10-12 00:40:39 +03:00
|
|
|
{buttonText?.length && (
|
|
|
|
|
<Button size="sm" variant="select">
|
2025-10-20 16:03:22 +03:00
|
|
|
<Link to={link ?? "#"}>{buttonText}</Link>
|
2025-10-12 00:40:39 +03:00
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|