Files
plane/web/core/components/empty-state/section-empty-state-root.tsx
Anmol Singh Bhatia 4432be15e4 [WEB-3166] chore: global empty state components (#6414)
* chore: detailed and simple empty state component added

* chore: section empty state component added

* chore: asset path helper hook added
2025-01-17 13:52:08 +05:30

25 lines
810 B
TypeScript

"use client";
import { FC } from "react";
type Props = {
icon: React.ReactNode;
title: string;
description?: string;
actionElement?: React.ReactNode;
};
export const SectionEmptyState: FC<Props> = (props) => {
const { title, description, icon, actionElement } = props;
return (
<div className="flex flex-col gap-4 items-center justify-center rounded-md border border-custom-border-200 p-10">
<div className="flex flex-col items-center gap-2">
<div className="flex items-center justify-center size-8 bg-custom-background-80 rounded">{icon}</div>
<span className="text-sm font-medium">{title}</span>
{description && <span className="text-xs text-custom-text-300">{description}</span>}
</div>
{actionElement && <>{actionElement}</>}
</div>
);
};