Home / File/ field-checkbox.tsx — ui Source File

field-checkbox.tsx — ui Source File

Architecture documentation for field-checkbox.tsx, a tsx file in the ui codebase. 3 imports, 1 dependents.

File tsx Internationalization Dictionary 3 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  14797cd8_efce_f3b0_b373_c8506b653cfa["field-checkbox.tsx"]
  cc83a0fe_5b64_ae51_20ef_2b5653e9e45f["checkbox"]
  14797cd8_efce_f3b0_b373_c8506b653cfa --> cc83a0fe_5b64_ae51_20ef_2b5653e9e45f
  7e9c1e20_5a8a_4152_90a3_40c280dc340e["field"]
  14797cd8_efce_f3b0_b373_c8506b653cfa --> 7e9c1e20_5a8a_4152_90a3_40c280dc340e
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  14797cd8_efce_f3b0_b373_c8506b653cfa --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  a20493d4_39f4_bced_97b9_027078a02a91["index.tsx"]
  a20493d4_39f4_bced_97b9_027078a02a91 --> 14797cd8_efce_f3b0_b373_c8506b653cfa
  style 14797cd8_efce_f3b0_b373_c8506b653cfa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { Checkbox } from "@/examples/base/ui-rtl/checkbox"
import { Field, FieldLabel } from "@/examples/base/ui-rtl/field"

import { useLanguageContext } from "@/components/language-selector"

const translations = {
  ar: {
    dir: "rtl" as const,
    terms: "أوافق على الشروط والأحكام",
  },
  he: {
    dir: "rtl" as const,
    terms: "אני מסכים לתנאים וההגבלות",
  },
}

export function FieldCheckbox() {
  const context = useLanguageContext()
  const lang = context?.language === "he" ? "he" : "ar"
  const { dir, terms } = translations[lang]

  return (
    <div dir={dir}>
      <FieldLabel htmlFor="checkbox-demo-rtl">
        <Field orientation="horizontal">
          <Checkbox id="checkbox-demo-rtl" defaultChecked />
          <FieldLabel htmlFor="checkbox-demo-rtl" className="line-clamp-1">
            {terms}
          </FieldLabel>
        </Field>
      </FieldLabel>
    </div>
  )
}

Subdomains

Functions

Dependencies

  • checkbox
  • field
  • language-selector

Frequently Asked Questions

What does field-checkbox.tsx do?
field-checkbox.tsx is a source file in the ui codebase, written in tsx. It belongs to the Internationalization domain, Dictionary subdomain.
What functions are defined in field-checkbox.tsx?
field-checkbox.tsx defines 1 function(s): FieldCheckbox.
What does field-checkbox.tsx depend on?
field-checkbox.tsx imports 3 module(s): checkbox, field, language-selector.
What files import field-checkbox.tsx?
field-checkbox.tsx is imported by 1 file(s): index.tsx.
Where is field-checkbox.tsx in the architecture?
field-checkbox.tsx is located at apps/v4/app/(app)/examples/rtl/components/field-checkbox.tsx (domain: Internationalization, subdomain: Dictionary, directory: apps/v4/app/(app)/examples/rtl/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free