"use client"
import * as React from "react"
import { Button } from "@/components/ui/button"
import { Tip } from "@/components/ui/tip"
import {
DESIGN_SYSTEM_DOC_ARTICLE,
DESIGN_SYSTEM_EXAMPLE_CANVAS,
DESIGN_SYSTEM_EXAMPLE_INNER,
DESIGN_SYSTEM_EXAMPLE_INNER_WIDE,
} from "@/lib/design-system/component-doc-shell"
import { DS_DOC_BODY, DS_DOC_CODE, DS_DOC_SECTION_TITLE, DS_DOC_SUBSECTION_TITLE } from "@/lib/design-system/doc-typography"
import { cn } from "@/lib/utils"
export function DesignSystemDocArticle({
className,
children,
}: {
className?: string
children: React.ReactNode
}) {
return {children}
}
export function DesignSystemExampleCanvas({
children,
wide = false,
}: {
children: React.ReactNode
/** Use full article width for HubTable / DataTable previews */
wide?: boolean
}) {
return (
)
}
function ImportPathRow({ label, path }: { label: string; path: string }) {
const [copied, setCopied] = React.useState(false)
const handleCopy = React.useCallback(async () => {
try {
await navigator.clipboard.writeText(path)
setCopied(true)
window.setTimeout(() => setCopied(false), 2000)
} catch {
setCopied(false)
}
}, [path])
return (
{label}
{path}
)
}
export function ComponentDocImportSection({
rows,
sourcePath,
}: {
rows: { label: string; path: string }[]
sourcePath?: string
}) {
return (
Import
{sourcePath ? (
Source: {sourcePath}
) : null}
)
}