chore: update empty states, fix: delete issue modal (#1743)

* chore: update empty states

* fix: delete issue modal

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
Nikhil 2023-08-01 13:58:58 +05:30 committed by GitHub
parent e48147f87e
commit 4e297d92f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 206 additions and 116 deletions

View file

@ -9,10 +9,12 @@ type Props = {
title: string;
description: React.ReactNode | string;
image: any;
buttonText?: string;
buttonIcon?: any;
primaryButton?: {
icon?: any;
text: string;
onClick: () => void;
};
secondaryButton?: React.ReactNode;
onClick?: () => void;
isFullScreen?: boolean;
};
@ -20,9 +22,7 @@ export const EmptyState: React.FC<Props> = ({
title,
description,
image,
onClick,
buttonText,
buttonIcon,
primaryButton,
secondaryButton,
isFullScreen = true,
}) => (
@ -32,14 +32,14 @@ export const EmptyState: React.FC<Props> = ({
}`}
>
<div className="text-center flex flex-col items-center w-full">
<Image src={image} className="w-52 sm:w-60" alt={buttonText} />
<Image src={image} className="w-52 sm:w-60" alt={primaryButton?.text} />
<h6 className="text-xl font-semibold mt-6 sm:mt-8 mb-3">{title}</h6>
<p className="text-custom-text-300 mb-7 sm:mb-8">{description}</p>
<div className="flex items-center gap-4">
{buttonText && (
<PrimaryButton className="flex items-center gap-1.5" onClick={onClick}>
{buttonIcon}
{buttonText}
{primaryButton && (
<PrimaryButton className="flex items-center gap-1.5" onClick={primaryButton.onClick}>
{primaryButton.icon}
{primaryButton.text}
</PrimaryButton>
)}
{secondaryButton}