switch-rtl.tsx — ui Source File
Architecture documentation for switch-rtl.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f928806f_5a39_5c9b_2739_99c8c2808fc7["switch-rtl.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] f928806f_5a39_5c9b_2739_99c8c2808fc7 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 7e9c1e20_5a8a_4152_90a3_40c280dc340e["field"] f928806f_5a39_5c9b_2739_99c8c2808fc7 --> 7e9c1e20_5a8a_4152_90a3_40c280dc340e a8e5b01d_1afb_b925_365f_5b8855de9c3f["switch"] f928806f_5a39_5c9b_2739_99c8c2808fc7 --> a8e5b01d_1afb_b925_365f_5b8855de9c3f 2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"] f928806f_5a39_5c9b_2739_99c8c2808fc7 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c style f928806f_5a39_5c9b_2739_99c8c2808fc7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import {
Field,
FieldContent,
FieldDescription,
FieldLabel,
} from "@/examples/base/ui-rtl/field"
import { Switch } from "@/examples/base/ui-rtl/switch"
import {
useTranslation,
type Translations,
} from "@/components/language-selector"
const translations: Translations = {
en: {
dir: "ltr",
values: {
label: "Share across devices",
description:
"Focus is shared across devices, and turns off when you leave the app.",
},
},
ar: {
dir: "rtl",
values: {
label: "المشاركة عبر الأجهزة",
description:
"يتم مشاركة التركيز عبر الأجهزة، ويتم إيقاف تشغيله عند مغادرة التطبيق.",
},
},
he: {
dir: "rtl",
values: {
label: "שיתוף בין מכשירים",
description: "המיקוד משותף בין מכשירים, וכבה כשאתה עוזב את האפליקציה.",
},
},
}
export function SwitchRtl() {
const { dir, t } = useTranslation(translations, "ar")
return (
<Field orientation="horizontal" className="max-w-sm" dir={dir}>
<FieldContent>
<FieldLabel htmlFor="switch-focus-mode-rtl" dir={dir}>
{t.label}
</FieldLabel>
<FieldDescription dir={dir}>{t.description}</FieldDescription>
</FieldContent>
<Switch id="switch-focus-mode-rtl" dir={dir} />
</Field>
)
}
Domain
Subdomains
Functions
Dependencies
- field
- language-selector
- react
- switch
Source
Frequently Asked Questions
What does switch-rtl.tsx do?
switch-rtl.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, ContentSourcing subdomain.
What functions are defined in switch-rtl.tsx?
switch-rtl.tsx defines 1 function(s): SwitchRtl.
What does switch-rtl.tsx depend on?
switch-rtl.tsx imports 4 module(s): field, language-selector, react, switch.
Where is switch-rtl.tsx in the architecture?
switch-rtl.tsx is located at apps/v4/examples/base/switch-rtl.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/examples/base).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free