Files
supabase/apps/design-system/registry/default/example/expanding-textarea-demo.tsx
Ivan Vasilov 22c5324f0c feat: Use expanding text area in the Ai Assistant (SQL Editor) (#27930)
* Add a new textarea component which autoexpands depending on number of content rows.

* Use the new ExpandingTextArea in the AIAssistantPanel.

* Remove old unused text area.

* Move around some of the props in the ExpandingTextArea.

* Make the value prop mandatory.

* Fix minor stuff in the Design System app.

* Add examples for Expanding Text Area.

* add max height to the expanding text area.

* Add todo comment in database-new app.
2024-07-12 11:32:20 +02:00

17 lines
369 B
TypeScript

import { useState } from 'react'
import { ExpandingTextArea } from 'ui'
export default function ExpandingTextareaDemo() {
const [value, setValue] = useState('')
return (
<ExpandingTextArea
placeholder="Type your message in multiple lines here."
value={value}
onChange={(event) => {
setValue(event.target.value)
}}
/>
)
}