36 lines
967 B
TypeScript
36 lines
967 B
TypeScript
"use client"
|
|
|
|
import { useLanguageContext } from "@/components/language-selector"
|
|
import { Checkbox } from "@/styles/base-nova/ui-rtl/checkbox"
|
|
import { Field, FieldLabel } from "@/styles/base-nova/ui-rtl/field"
|
|
|
|
const translations = {
|
|
ar: {
|
|
dir: "rtl" as const,
|
|
terms: "أوافق على الشروط والأحكام",
|
|
},
|
|
he: {
|
|
dir: "rtl" as const,
|
|
terms: "אני מסכים לתנאים וההגבלות",
|
|
},
|
|
}
|
|
|
|
export function FieldCheckbox() {
|
|
const context = useLanguageContext()
|
|
const lang = context?.language === "he" ? "he" : "ar"
|
|
const { dir, terms } = translations[lang]
|
|
|
|
return (
|
|
<div dir={dir}>
|
|
<FieldLabel htmlFor="checkbox-demo-rtl">
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="checkbox-demo-rtl" defaultChecked />
|
|
<FieldLabel htmlFor="checkbox-demo-rtl" className="line-clamp-1">
|
|
{terms}
|
|
</FieldLabel>
|
|
</Field>
|
|
</FieldLabel>
|
|
</div>
|
|
)
|
|
}
|