Home / File/ share.tsx — ui Source File

share.tsx — ui Source File

Architecture documentation for share.tsx, a tsx file in the ui codebase. 8 imports, 0 dependents.

File tsx Internationalization Dictionary 8 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  b24c8784_f163_eea2_d95e_83c845f753ff["share.tsx"]
  550576ca_32fe_8288_72d6_10281189833b["avatar"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> 550576ca_32fe_8288_72d6_10281189833b
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> 57e86e45_ac6e_7278_be08_9092724e8401
  c6d6139d_ea69_3d79_5004_68419bae2ac0["card"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> c6d6139d_ea69_3d79_5004_68419bae2ac0
  80cf663d_a411_487c_d69e_ac9d405cd2ec["input"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> 80cf663d_a411_487c_d69e_ac9d405cd2ec
  58f4fa76_4350_6209_54e6_f19a58e0eda4["item"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> 58f4fa76_4350_6209_54e6_f19a58e0eda4
  d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d
  c2fa7225_1ddd_1cbc_8810_ee5e42af14d6["select"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> c2fa7225_1ddd_1cbc_8810_ee5e42af14d6
  b2c60dee_4ede_8485_a6b4_91c999cdc69f["separator"]
  b24c8784_f163_eea2_d95e_83c845f753ff --> b2c60dee_4ede_8485_a6b4_91c999cdc69f
  style b24c8784_f163_eea2_d95e_83c845f753ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  Avatar,
  AvatarFallback,
  AvatarImage,
} from "@/registry/new-york-v4/ui/avatar"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/registry/new-york-v4/ui/card"
import { Input } from "@/registry/new-york-v4/ui/input"
import {
  Item,
  ItemActions,
  ItemContent,
  ItemDescription,
  ItemGroup,
  ItemTitle,
} from "@/registry/new-york-v4/ui/item"
import { Label } from "@/registry/new-york-v4/ui/label"
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/registry/new-york-v4/ui/select"
import { Separator } from "@/registry/new-york-v4/ui/separator"

const people = [
  {
    name: "Olivia Martin",
    email: "m@example.com",
    avatar: "/avatars/03.png",
  },
  {
    name: "Isabella Nguyen",
    email: "b@example.com",
    avatar: "/avatars/04.png",
  },
  {
    name: "Sofia Davis",
    email: "p@example.com",
    avatar: "/avatars/05.png",
  },
  {
    name: "Ethan Thompson",
    email: "e@example.com",
    avatar: "/avatars/01.png",
  },
]
export function CardsShare() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Share this document</CardTitle>
        <CardDescription>
          Anyone with the link can view this document.
        </CardDescription>
      </CardHeader>
      <CardContent>
        <div className="flex items-center gap-2">
          <Label htmlFor="link" className="sr-only">
            Link
          </Label>
          <Input
            id="link"
            value="http://example.com/link/to/document"
            className="h-8"
            readOnly
          />
          <Button size="sm" variant="outline" className="shadow-none">
            Copy Link
          </Button>
        </div>
        <Separator className="my-4" />
        <div className="flex flex-col gap-4">
          <div className="text-sm font-medium">People with access</div>
          <ItemGroup>
            {people.map((person) => (
              <Item key={person.email} className="px-0 py-2">
                <Avatar>
                  <AvatarImage src={person.avatar} alt="Image" />
                  <AvatarFallback>{person.name.charAt(0)}</AvatarFallback>
                </Avatar>
                <ItemContent>
                  <ItemTitle>{person.name}</ItemTitle>
                  <ItemDescription>{person.email}</ItemDescription>
                </ItemContent>
                <ItemActions>
                  <Select defaultValue="edit">
                    <SelectTrigger
                      className="ml-auto pr-2"
                      aria-label="Edit"
                      size="sm"
                    >
                      <SelectValue placeholder="Select" />
                    </SelectTrigger>
                    <SelectContent align="end">
                      <SelectItem value="edit">Can edit</SelectItem>
                      <SelectItem value="view">Can view</SelectItem>
                    </SelectContent>
                  </Select>
                </ItemActions>
              </Item>
            ))}
          </ItemGroup>
        </div>
      </CardContent>
    </Card>
  )
}

Subdomains

Functions

Dependencies

  • avatar
  • button
  • card
  • input
  • item
  • label
  • select
  • separator

Frequently Asked Questions

What does share.tsx do?
share.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 share.tsx?
share.tsx defines 1 function(s): CardsShare.
What does share.tsx depend on?
share.tsx imports 8 module(s): avatar, button, card, input, item, label, select, separator.
Where is share.tsx in the architecture?
share.tsx is located at apps/v4/components/cards/share.tsx (domain: Internationalization, subdomain: Dictionary, directory: apps/v4/components/cards).

Analyze Your Own Codebase

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

Try Supermodel Free