chore: upgrade to react 19 beta and next 14 canary

This commit is contained in:
2024-05-19 14:53:00 +02:00
parent fe429295ef
commit 63e0be09e6
65 changed files with 2626 additions and 1898 deletions

View File

@@ -1,27 +1,20 @@
import * as React from "react";
import equal from "react-fast-compare";
import { ComponentProps } from "react";
import { cn } from "@/lib/style";
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
export type TextareaProps = ComponentProps<"textarea">;
export const RawTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => (
<textarea
{...{ ref }}
className={cn(
"border-b-1 resize-none rounded border border-b-muted-foreground bg-textarea px-3 py-2 font-mono outline-none",
"placeholder:text-muted-foreground",
"hover:bg-textarea-hover",
"focus:border-b-2 focus:border-b-indicator focus:bg-textarea-focus focus:pb-[7px]",
"disabled:cursor-not-allowed disabled:opacity-50",
className
)}
spellCheck="false"
{...props}
/>
)
export const Textarea = ({ className, ...props }: TextareaProps) => (
<textarea
className={cn(
"border-b-1 resize-none rounded border border-b-muted-foreground bg-textarea px-3 py-2 font-mono outline-none",
"placeholder:text-muted-foreground",
"hover:bg-textarea-hover",
"focus:border-b-2 focus:border-b-indicator focus:bg-textarea-focus focus:pb-[7px]",
"disabled:cursor-not-allowed disabled:opacity-50",
className
)}
spellCheck="false"
{...props}
/>
);
RawTextarea.displayName = "RawTextarea";
export const Textarea = React.memo(RawTextarea, equal);