Home / Function/ CodeSampleWrapper() — supabase Function Reference

CodeSampleWrapper() — supabase Function Reference

Architecture documentation for the CodeSampleWrapper() function in CodeSample.client.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/docs/features/directives/CodeSample.client.tsx lines 19–37

export function CodeSampleWrapper({
  children,
  /**
   * A GitHub URL to the source code file.
   */
  source: _source,
}: PropsWithChildren<{ source: string | URL | (string | URL)[] }>) {
  const source = Array.isArray(_source) ? _source : [_source]

  if (source.length === 1) {
    return <SingleSource source={source[0]}>{children}</SingleSource>
  }

  if (source.length > 1) {
    return <MultipleSources sources={source}>{children}</MultipleSources>
  }

  return <>{children}</>
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free