Home / File/ scroll-area-rtl.tsx — ui Source File

scroll-area-rtl.tsx — ui Source File

Architecture documentation for scroll-area-rtl.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx DocumentationAtlas ContentSourcing 4 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  d748b494_fbed_a71e_1146_201e75b718b4["scroll-area-rtl.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  d748b494_fbed_a71e_1146_201e75b718b4 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  23e4a359_9970_678a_a6b2_24a17841aea4["scroll-area"]
  d748b494_fbed_a71e_1146_201e75b718b4 --> 23e4a359_9970_678a_a6b2_24a17841aea4
  d91f2d92_028d_f8a9_3acf_7be6f2a34921["separator"]
  d748b494_fbed_a71e_1146_201e75b718b4 --> d91f2d92_028d_f8a9_3acf_7be6f2a34921
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  d748b494_fbed_a71e_1146_201e75b718b4 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style d748b494_fbed_a71e_1146_201e75b718b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { ScrollArea } from "@/examples/base/ui-rtl/scroll-area"
import { Separator } from "@/examples/base/ui-rtl/separator"

import {
  useTranslation,
  type Translations,
} from "@/components/language-selector"

const tags = Array.from({ length: 50 }).map(
  (_, i, a) => `v1.2.0-beta.${a.length - i}`
)

const translations: Translations = {
  en: {
    dir: "ltr",
    values: {
      tags: "Tags",
    },
  },
  ar: {
    dir: "rtl",
    values: {
      tags: "العلامات",
    },
  },
  he: {
    dir: "rtl",
    values: {
      tags: "תגיות",
    },
  },
}

export function ScrollAreaRtl() {
  const { dir, t } = useTranslation(translations, "ar")

  return (
    <ScrollArea className="h-72 w-48 rounded-md border" dir={dir}>
      <div className="p-4">
        <h4 className="mb-4 text-sm leading-none font-medium">{t.tags}</h4>
        {tags.map((tag) => (
          <React.Fragment key={tag}>
            <div className="text-sm">{tag}</div>
            <Separator className="my-2" />
          </React.Fragment>
        ))}
      </div>
    </ScrollArea>
  )
}

Subdomains

Dependencies

  • language-selector
  • react
  • scroll-area
  • separator

Frequently Asked Questions

What does scroll-area-rtl.tsx do?
scroll-area-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 scroll-area-rtl.tsx?
scroll-area-rtl.tsx defines 2 function(s): ScrollAreaRtl, tags.
What does scroll-area-rtl.tsx depend on?
scroll-area-rtl.tsx imports 4 module(s): language-selector, react, scroll-area, separator.
Where is scroll-area-rtl.tsx in the architecture?
scroll-area-rtl.tsx is located at apps/v4/examples/base/scroll-area-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