- 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]>
31 lines
844 B
TypeScript
31 lines
844 B
TypeScript
import { cn } from "@plane/utils";
|
|
|
|
type Props = {
|
|
title?: string;
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
subtitle?: string | null;
|
|
actions?: React.ReactNode;
|
|
headerClassName?: string;
|
|
};
|
|
|
|
function AnalyticsSectionWrapper(props: Props) {
|
|
const { title, children, className, subtitle, actions, headerClassName } = props;
|
|
return (
|
|
<div className={className}>
|
|
<div className={cn("mb-6 flex items-center gap-2 text-nowrap ", headerClassName)}>
|
|
{title && (
|
|
<div className="flex items-center gap-2 ">
|
|
<h1 className={"text-lg font-medium"}>{title}</h1>
|
|
{/* {subtitle && <p className="text-lg text-custom-text-300"> • {subtitle}</p>} */}
|
|
</div>
|
|
)}
|
|
{actions}
|
|
</div>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default AnalyticsSectionWrapper;
|