- Add jscodeshift-based codemod to convert arrow function components to function declarations - Support React.FC, observer-wrapped, and forwardRef components - Include comprehensive test suite covering edge cases - Add npm script to run transformer across codebase - Target only .tsx files in source directories, excluding node_modules and declaration files * [WEB-5459] chore: updates after running codemod --------- Co-authored-by: sriramveeraghanta <[email protected]>
32 lines
945 B
TypeScript
32 lines
945 B
TypeScript
"use client";
|
|
|
|
import type { FC } from "react";
|
|
import { cn } from "@plane/utils";
|
|
|
|
type Props = {
|
|
icon: React.ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
actionElement?: React.ReactNode;
|
|
customClassName?: string;
|
|
};
|
|
|
|
export function SectionEmptyState(props: Props) {
|
|
const { title, description, icon, actionElement, customClassName } = props;
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex flex-col gap-4 items-center justify-center rounded-md border border-custom-border-200 p-10",
|
|
customClassName
|
|
)}
|
|
>
|
|
<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>
|
|
);
|
|
}
|