- 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 <veeraghanta.sriram@gmail.com>
25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
import React from "react";
|
|
import { cn } from "./utils";
|
|
|
|
type Props = {
|
|
isVisible: boolean;
|
|
classNames?: string;
|
|
};
|
|
|
|
export function DropIndicator(props: Props) {
|
|
const { isVisible, classNames = "" } = props;
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
`block relative h-[2px] w-full
|
|
before:left-0 before:relative before:block before:top-[-2px] before:h-[6px] before:w-[6px] before:rounded
|
|
after:left-[calc(100%-6px)] after:relative after:block after:top-[-8px] after:h-[6px] after:w-[6px] after:rounded`,
|
|
{
|
|
"bg-custom-primary-100 before:bg-custom-primary-100 after:bg-custom-primary-100": isVisible,
|
|
},
|
|
classNames
|
|
)}
|
|
/>
|
|
);
|
|
}
|