popover-rtl.tsx — ui Source File
Architecture documentation for popover-rtl.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c30299d2_0244_7ef9_a4fe_a1212a23f2e7["popover-rtl.tsx"] 43bb9fc1_6eab_13df_a99b_981eb13b9ec1["button"] c30299d2_0244_7ef9_a4fe_a1212a23f2e7 --> 43bb9fc1_6eab_13df_a99b_981eb13b9ec1 4e2008eb_827c_ac2f_bc4f_01dc295f094e["popover"] c30299d2_0244_7ef9_a4fe_a1212a23f2e7 --> 4e2008eb_827c_ac2f_bc4f_01dc295f094e 2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"] c30299d2_0244_7ef9_a4fe_a1212a23f2e7 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c style c30299d2_0244_7ef9_a4fe_a1212a23f2e7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { Button } from "@/examples/base/ui-rtl/button"
import {
Popover,
PopoverContent,
PopoverDescription,
PopoverHeader,
PopoverTitle,
PopoverTrigger,
} from "@/examples/base/ui-rtl/popover"
import {
useTranslation,
type Translations,
} from "@/components/language-selector"
const translations: Translations = {
en: {
dir: "ltr",
values: {
title: "Dimensions",
description: "Set the dimensions for the layer.",
"inline-start": "Inline Start",
left: "Left",
top: "Top",
bottom: "Bottom",
right: "Right",
"inline-end": "Inline End",
},
},
ar: {
dir: "rtl",
values: {
title: "الأبعاد",
description: "تعيين الأبعاد للطبقة.",
"inline-start": "بداية السطر",
left: "يسار",
top: "أعلى",
bottom: "أسفل",
right: "يمين",
"inline-end": "نهاية السطر",
},
},
he: {
dir: "rtl",
values: {
title: "מימדים",
description: "הגדר את המימדים לשכבה.",
"inline-start": "תחילת השורה",
left: "שמאל",
top: "למעלה",
bottom: "למטה",
right: "ימין",
"inline-end": "סוף השורה",
},
},
}
const physicalSides = ["left", "top", "bottom", "right"] as const
const logicalSides = ["inline-start", "inline-end"] as const
export function PopoverRtl() {
const { dir, t } = useTranslation(translations, "ar")
return (
<div className="grid gap-4">
<div className="flex flex-wrap justify-center gap-2">
{physicalSides.map((side) => (
<Popover key={side}>
<PopoverTrigger render={<Button variant="outline" />}>
{t[side]}
</PopoverTrigger>
<PopoverContent side={side} dir={dir}>
<PopoverHeader>
<PopoverTitle>{t.title}</PopoverTitle>
<PopoverDescription>{t.description}</PopoverDescription>
</PopoverHeader>
</PopoverContent>
</Popover>
))}
</div>
<div className="flex flex-wrap justify-center gap-2">
{logicalSides.map((side) => (
<Popover key={side}>
<PopoverTrigger render={<Button variant="outline" />}>
{t[side]}
</PopoverTrigger>
<PopoverContent side={side} dir={dir}>
<PopoverHeader>
<PopoverTitle>{t.title}</PopoverTitle>
<PopoverDescription>{t.description}</PopoverDescription>
</PopoverHeader>
</PopoverContent>
</Popover>
))}
</div>
</div>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- language-selector
- popover
Source
Frequently Asked Questions
What does popover-rtl.tsx do?
popover-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 popover-rtl.tsx?
popover-rtl.tsx defines 1 function(s): PopoverRtl.
What does popover-rtl.tsx depend on?
popover-rtl.tsx imports 3 module(s): button, language-selector, popover.
Where is popover-rtl.tsx in the architecture?
popover-rtl.tsx is located at apps/v4/examples/base/popover-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