Skip to content

Commit

Permalink
feat(styling): cursor-not-allowed when composer input is disable (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 6, 2024
1 parent 0aa4e6b commit b2801ce
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-sheep-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@assistant-ui/react": patch
---

feat(styling): cursor-not-allowed when composer input is disabled
2 changes: 1 addition & 1 deletion packages/react/src/styles/tailwindcss/thread.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

.aui-composer-input {
@apply placeholder:text-aui-muted-foreground max-h-40 flex-grow resize-none border-none bg-transparent px-2 py-4 text-sm outline-none focus:ring-0;
@apply placeholder:text-aui-muted-foreground max-h-40 flex-grow resize-none border-none bg-transparent px-2 py-4 text-sm outline-none focus:ring-0 disabled:cursor-not-allowed;
}

.aui-composer-send,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const MyComposer: FC = () => {
autoFocus
placeholder="Write a message..."
rows={1}
className="placeholder:text-muted-foreground max-h-40 flex-grow resize-none border-none bg-transparent px-2 py-4 text-sm outline-none focus:ring-0"
className="placeholder:text-muted-foreground max-h-40 flex-grow resize-none border-none bg-transparent px-2 py-4 text-sm outline-none focus:ring-0 disabled:cursor-not-allowed"
/>
<ThreadPrimitive.If running={false}>
<ComposerPrimitive.Send asChild>
Expand Down
2 changes: 1 addition & 1 deletion packages/shadcn-registry/registry/assistant-ui/thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MyComposer: FC = () => {
autoFocus
placeholder="Write a message..."
rows={1}
className="placeholder:text-muted-foreground size-full max-h-40 resize-none border-none bg-transparent p-4 pr-12 text-sm outline-none focus:ring-0"
className="placeholder:text-muted-foreground size-full max-h-40 resize-none border-none bg-transparent p-4 pr-12 text-sm outline-none focus:ring-0 disabled:cursor-not-allowed"
/>
<ComposerPrimitive.Send asChild>
<TooltipIconButton
Expand Down

0 comments on commit b2801ce

Please sign in to comment.