initial: mirror of @fn_library from fn_registry
75 components + DESIGN_SYSTEM.md + sync script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react'
|
||||
import { Textarea as MantineTextarea } from '@mantine/core'
|
||||
|
||||
interface TextareaProps extends Omit<React.ComponentProps<typeof MantineTextarea>, 'autosize'> {
|
||||
autoResize?: boolean
|
||||
}
|
||||
|
||||
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||
({ className, autoResize = false, ...props }, ref) => {
|
||||
return (
|
||||
<MantineTextarea
|
||||
ref={ref}
|
||||
data-slot="textarea"
|
||||
autosize={autoResize}
|
||||
minRows={autoResize ? 2 : undefined}
|
||||
size="sm"
|
||||
className={className}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
)
|
||||
Textarea.displayName = 'Textarea'
|
||||
|
||||
export { Textarea }
|
||||
export type { TextareaProps }
|
||||
Reference in New Issue
Block a user