mirror of
https://github.com/makeplane/plane.git
synced 2026-06-13 19:19:54 +00:00
83fdebf64d
- 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>
24 lines
562 B
TypeScript
24 lines
562 B
TypeScript
import { cn } from "@plane/utils";
|
|
|
|
type TProps = {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
darkerShade?: boolean;
|
|
};
|
|
|
|
export function CodeBlock({ children, className, darkerShade }: TProps) {
|
|
return (
|
|
<span
|
|
className={cn(
|
|
"px-0.5 text-xs text-custom-text-300 bg-custom-background-90 font-semibold rounded-md border border-custom-border-100",
|
|
{
|
|
"text-custom-text-200 bg-custom-background-80 border-custom-border-200": darkerShade,
|
|
},
|
|
className
|
|
)}
|
|
>
|
|
{children}
|
|
</span>
|
|
);
|
|
}
|