Home / File/ style-wrapper.tsx — ui Source File

style-wrapper.tsx — ui Source File

Architecture documentation for style-wrapper.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  a992f9f0_b384_fefd_92d8_7c6f9a340454["style-wrapper.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  a992f9f0_b384_fefd_92d8_7c6f9a340454 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  8c6845ea_e0db_55db_4a65_df2f64d9e581["use-config"]
  a992f9f0_b384_fefd_92d8_7c6f9a340454 --> 8c6845ea_e0db_55db_4a65_df2f64d9e581
  9798186b_08af_1d79_2ad7_d662300dc0ba["registry-styles"]
  a992f9f0_b384_fefd_92d8_7c6f9a340454 --> 9798186b_08af_1d79_2ad7_d662300dc0ba
  style a992f9f0_b384_fefd_92d8_7c6f9a340454 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"

import { useConfig } from "@/hooks/use-config"
import { Style } from "@/registry/registry-styles"

interface StyleWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
  styleName?: Style["name"]
}

export function StyleWrapper({ styleName, children }: StyleWrapperProps) {
  const [config] = useConfig()

  if (!styleName || config.style === styleName) {
    return <>{children}</>
  }

  return null
}

Subdomains

Functions

Dependencies

  • react
  • registry-styles
  • use-config

Frequently Asked Questions

What does style-wrapper.tsx do?
style-wrapper.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 style-wrapper.tsx?
style-wrapper.tsx defines 1 function(s): StyleWrapper.
What does style-wrapper.tsx depend on?
style-wrapper.tsx imports 3 module(s): react, registry-styles, use-config.
Where is style-wrapper.tsx in the architecture?
style-wrapper.tsx is located at deprecated/www/components/style-wrapper.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