Conversation
wanted to add the disabled prop to ChatInput so I could disable it until my user had authed, so figured while here, I may as well add all form/input props and pass them through to the component
🦋 Changeset detectedLatest commit: bc93c9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| return ( | ||
| <form | ||
| onSubmit={handleSubmit} | ||
| {...formProps} |
There was a problem hiding this comment.
order matters, so I added the pass-through props after onSubmit so if you really know what you're doing, you can override the default behavior. cn + props.className is already a way to override the default, so I placed it after
| name="input" | ||
| placeholder={props.placeholder ?? 'Type a message...'} | ||
| spellCheck={false} | ||
| {...textareaProps} |
There was a problem hiding this comment.
I moved the defaults above the pass-through props, and the things that should not be overridden (or can already be overridden, like placeholder and className) below
In my project, I wanted to add the disabled prop to ChatInput so I could disable it until my user had auth'ed, so I figured while here, I may as well add all form/input props and pass them through to the component