import React from "react"; import Image from "next/image"; // components // ui import { Button, getButtonStyling } from "@plane/ui"; // helper import { cn } from "helpers/common.helper"; import { ComicBoxButton } from "./comic-box-button"; type Props = { title: string; description?: string; image: any; primaryButton?: { icon?: any; text: string; onClick: () => void; }; secondaryButton?: { icon?: any; text: string; onClick: () => void; }; comicBox?: { title: string; description: string; }; size?: "sm" | "lg"; disabled?: boolean; }; export const EmptyState: React.FC = ({ title, description, image, primaryButton, secondaryButton, comicBox, size = "sm", disabled = false, }) => { const emptyStateHeader = ( <> {description ? ( <>

{title}

{description}

) : (

{title}

)} ); const secondaryButtonElement = secondaryButton && ( ); return (
{emptyStateHeader}
{primaryButton?.text
{primaryButton && ( <>
{comicBox ? ( primaryButton.onClick()} disabled={disabled} /> ) : (
primaryButton.onClick()} > {primaryButton.icon} {primaryButton.text}
)}
)} {secondaryButton && secondaryButtonElement}
); };