mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-02 08:58:36 +00:00
* feat: rtl * feat * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: add sidebar * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * chore: changeset * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix
39 lines
600 B
TypeScript
39 lines
600 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { Slider } from "@/examples/base/ui-rtl/slider"
|
|
|
|
import {
|
|
useTranslation,
|
|
type Translations,
|
|
} from "@/components/language-selector"
|
|
|
|
const translations: Translations = {
|
|
en: {
|
|
dir: "ltr",
|
|
values: {},
|
|
},
|
|
ar: {
|
|
dir: "rtl",
|
|
values: {},
|
|
},
|
|
he: {
|
|
dir: "rtl",
|
|
values: {},
|
|
},
|
|
}
|
|
|
|
export function SliderRtl() {
|
|
const { dir } = useTranslation(translations, "ar")
|
|
|
|
return (
|
|
<Slider
|
|
defaultValue={[75]}
|
|
max={100}
|
|
step={1}
|
|
className="mx-auto w-full max-w-xs"
|
|
dir={dir}
|
|
/>
|
|
)
|
|
}
|