mirror of
https://github.com/linsa-io/linsa.git
synced 2026-03-18 23:33:59 +01:00
* wip * wip page * chore: style * wip pages * wip pages * chore: toggle * chore: link * feat: topic search * chore: page section * refactor: apply tailwind class ordering * fix: handle loggedIn user for guest route * feat: folder & image schema * chore: move utils to shared * refactor: tailwind class ordering * feat: img ext for editor * refactor: remove qa * fix: tanstack start * fix: wrong import * chore: use toast * chore: schema
26 lines
917 B
TypeScript
26 lines
917 B
TypeScript
import * as React from "react"
|
|
import BaseTextareaAutosize from "react-textarea-autosize"
|
|
import { TextareaAutosizeProps as BaseTextareaAutosizeProps } from "react-textarea-autosize"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
export interface TextareaProps extends Omit<BaseTextareaAutosizeProps, "ref"> {}
|
|
|
|
const TextareaAutosize = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
({ className, ...props }, ref) => {
|
|
return (
|
|
<BaseTextareaAutosize
|
|
className={cn(
|
|
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
className,
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
)
|
|
},
|
|
)
|
|
|
|
TextareaAutosize.displayName = "TextareaAutosize"
|
|
|
|
export { TextareaAutosize }
|