2026-01-27 08:24:22 +00:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
* See the LICENSE file for details.
|
|
|
|
|
*/
|
|
|
|
|
|
2025-05-09 08:54:06 +00:00
|
|
|
import { cn } from "@plane/utils";
|
2025-01-17 08:22:08 +00:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
icon: React.ReactNode;
|
|
|
|
|
title: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
actionElement?: React.ReactNode;
|
2025-05-09 08:54:06 +00:00
|
|
|
customClassName?: string;
|
2025-01-17 08:22:08 +00:00
|
|
|
};
|
|
|
|
|
|
2025-11-20 12:09:40 +00:00
|
|
|
export function SectionEmptyState(props: Props) {
|
2025-05-09 08:54:06 +00:00
|
|
|
const { title, description, icon, actionElement, customClassName } = props;
|
2025-01-17 08:22:08 +00:00
|
|
|
return (
|
2025-05-09 08:54:06 +00:00
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-03-02 15:10:50 +00:00
|
|
|
"flex flex-col items-center justify-center gap-4 rounded-md border border-subtle p-10",
|
2025-05-09 08:54:06 +00:00
|
|
|
customClassName
|
|
|
|
|
)}
|
|
|
|
|
>
|
2025-01-17 08:22:08 +00:00
|
|
|
<div className="flex flex-col items-center gap-2">
|
2026-03-02 15:10:50 +00:00
|
|
|
<div className="flex size-8 items-center justify-center rounded-sm bg-layer-1">{icon}</div>
|
2025-12-12 15:20:14 +00:00
|
|
|
<span className="text-13 font-medium">{title}</span>
|
|
|
|
|
{description && <span className="text-11 text-tertiary">{description}</span>}
|
2025-01-17 08:22:08 +00:00
|
|
|
</div>
|
|
|
|
|
{actionElement && <>{actionElement}</>}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2025-11-20 12:09:40 +00:00
|
|
|
}
|