Home / File/ block-image.tsx — ui Source File

block-image.tsx — ui Source File

Architecture documentation for block-image.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  7a7cce26_16a2_0edb_2e60_046cad2efc49["block-image.tsx"]
  3eb36dd7_f51a_1431_02e2_7abafe315718["image"]
  7a7cce26_16a2_0edb_2e60_046cad2efc49 --> 3eb36dd7_f51a_1431_02e2_7abafe315718
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  7a7cce26_16a2_0edb_2e60_046cad2efc49 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style 7a7cce26_16a2_0edb_2e60_046cad2efc49 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Image from "next/image"

import { cn } from "@/lib/utils"

export function BlockImage({
  name,
  width = 1440,
  height = 900,
  className,
}: Omit<React.ComponentProps<typeof Image>, "src" | "alt"> & { name: string }) {
  return (
    <div
      className={cn(
        "relative aspect-[1440/900] w-full overflow-hidden rounded-lg",
        className
      )}
    >
      <Image
        src={`/r/styles/new-york/${name}-light.png`}
        alt={name}
        width={width}
        height={height}
        className="object-cover dark:hidden"
        data-image="light"
      />
      <Image
        src={`/r/styles/new-york/${name}-dark.png`}
        alt={name}
        width={width}
        height={height}
        className="hidden object-cover dark:block"
        data-image="dark"
      />
    </div>
  )
}

Subdomains

Functions

Dependencies

  • image
  • utils

Frequently Asked Questions

What does block-image.tsx do?
block-image.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in block-image.tsx?
block-image.tsx defines 1 function(s): BlockImage.
What does block-image.tsx depend on?
block-image.tsx imports 2 module(s): image, utils.
Where is block-image.tsx in the architecture?
block-image.tsx is located at deprecated/www/components/block-image.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components).

Analyze Your Own Codebase

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

Try Supermodel Free