Refactor chatInput component to use Popover for repetitions input
This commit is contained in:
parent
7eac47f4c8
commit
174cd37a2b
1 changed files with 14 additions and 12 deletions
|
|
@ -4,8 +4,8 @@ import { Textarea } from "../../../components/ui/textarea";
|
||||||
import { chatInputType } from "../../../types/components";
|
import { chatInputType } from "../../../types/components";
|
||||||
import { classNames } from "../../../utils/utils";
|
import { classNames } from "../../../utils/utils";
|
||||||
import { Button } from "../../ui/button";
|
import { Button } from "../../ui/button";
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover";
|
|
||||||
import { Input } from "../../ui/input";
|
import { Input } from "../../ui/input";
|
||||||
|
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover";
|
||||||
|
|
||||||
export default function ChatInput({
|
export default function ChatInput({
|
||||||
lockChat,
|
lockChat,
|
||||||
|
|
@ -120,17 +120,19 @@ export default function ChatInput({
|
||||||
<IconComponent name="Repeat" className="" aria-hidden="true" />
|
<IconComponent name="Repeat" className="" aria-hidden="true" />
|
||||||
</Button>
|
</Button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-fit"><div className="flex flex-col gap-2 items-center justify-center">
|
<PopoverContent className="w-fit">
|
||||||
<span className="text-sm">Repetitions: </span>
|
<div className="flex flex-col items-center justify-center gap-2">
|
||||||
<Input
|
<span className="text-sm">Repetitions: </span>
|
||||||
onChange={(e) => {
|
<Input
|
||||||
handleChange(parseInt(e.target.value));
|
onChange={(e) => {
|
||||||
}}
|
handleChange(parseInt(e.target.value));
|
||||||
className="w-16"
|
}}
|
||||||
type="number"
|
className="w-16"
|
||||||
min={0}
|
type="number"
|
||||||
/>
|
min={0}
|
||||||
</div></PopoverContent>
|
/>
|
||||||
|
</div>
|
||||||
|
</PopoverContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue