mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 23:55:02 +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
45 lines
773 B
TypeScript
45 lines
773 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { Kbd, KbdGroup } from "@/examples/base/ui-rtl/kbd"
|
|
|
|
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 KbdRtl() {
|
|
const { dir } = useTranslation(translations, "ar")
|
|
|
|
return (
|
|
<div className="flex flex-col items-center gap-4" dir={dir}>
|
|
<KbdGroup>
|
|
<Kbd>⌘</Kbd>
|
|
<Kbd>⇧</Kbd>
|
|
<Kbd>⌥</Kbd>
|
|
<Kbd>⌃</Kbd>
|
|
</KbdGroup>
|
|
<KbdGroup>
|
|
<Kbd>Ctrl</Kbd>
|
|
<span>+</span>
|
|
<Kbd>B</Kbd>
|
|
</KbdGroup>
|
|
</div>
|
|
)
|
|
}
|