Files
kandev/apps/web/components/quick-chat/configuration-chat-toggle.tsx
T
João Salavisa ed912b2683 feat(i18n): localize editors and quick-chat (#2300)
Co-authored-by: Kandev Agent <agent@kandev.dev>
2026-08-06 01:41:04 +02:00

37 lines
973 B
TypeScript

"use client";
import { Switch } from "@kandev/ui/switch";
import { useTranslation } from "react-i18next";
export function ConfigurationChatToggle({
checked,
disabled,
onCheckedChange,
}: {
checked: boolean;
disabled?: boolean;
onCheckedChange: (checked: boolean) => void;
}) {
const { t } = useTranslation();
return (
<section
className="flex min-h-11 items-center justify-between gap-4"
aria-labelledby="config-chat-mode-label"
>
<div className="min-w-0">
<h3 id="config-chat-mode-label" className="text-sm font-medium">
{t("chat:configurationChat")}
</h3>
<p className="text-xs text-muted-foreground">{t("chat:configurationChatDescription")}</p>
</div>
<Switch
aria-label={t("chat:configurationChat")}
checked={checked}
disabled={disabled}
onCheckedChange={onCheckedChange}
className="shrink-0 cursor-pointer"
/>
</section>
);
}