mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-17 20:49:24 +00:00
chore: upgrade to react 19 beta and next 14 canary
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user