Files
shadcn/apps/v4/examples/base/native-select-rtl.tsx
zeekay 16c4453cc1 feat: sync with upstream shadcn/ui (through [email protected])
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in:
- [email protected] through [email protected] releases
- New apps/v4 directory structure
- Registry system improvements and MCP server
- Framework support (Vue, Svelte, React Native)
- New templates (vite-app, monorepo-next, laravel)
- Zod 4 compatibility (scoped override for zod@>4)
- Test fixture corrections for alias resolution

All 867 merge conflicts resolved preserving Hanzo customizations.
1020/1020 shadcn tests pass.
2026-02-09 10:44:26 -08:00

62 lines
1.4 KiB
TypeScript

"use client"
import * as React from "react"
import {
NativeSelect,
NativeSelectOption,
} from "@/examples/base/ui-rtl/native-select"
import {
useTranslation,
type Translations,
} from "@/components/language-selector"
const translations: Translations = {
en: {
dir: "ltr",
values: {
placeholder: "Select status",
todo: "Todo",
inProgress: "In Progress",
done: "Done",
cancelled: "Cancelled",
},
},
ar: {
dir: "rtl",
values: {
placeholder: "اختر الحالة",
todo: "مهام",
inProgress: "قيد التنفيذ",
done: "منجز",
cancelled: "ملغي",
},
},
he: {
dir: "rtl",
values: {
placeholder: "בחר סטטוס",
todo: "לעשות",
inProgress: "בתהליך",
done: "הושלם",
cancelled: "בוטל",
},
},
}
export function NativeSelectRtl() {
const { dir, t } = useTranslation(translations, "ar")
return (
<NativeSelect dir={dir}>
<NativeSelectOption value="">{t.placeholder}</NativeSelectOption>
<NativeSelectOption value="todo">{t.todo}</NativeSelectOption>
<NativeSelectOption value="in-progress">
{t.inProgress}
</NativeSelectOption>
<NativeSelectOption value="done">{t.done}</NativeSelectOption>
<NativeSelectOption value="cancelled">{t.cancelled}</NativeSelectOption>
</NativeSelect>
)
}