import * as React from 'react'; import { ComponentProps } from '../lib/stitches.js'; import { ScrollArea } from './scroll-area.js'; type CodeProps = { /** * The code to be rendered. */ children: string | Record; /** * An optional caption to render above the code block. */ caption?: string; /** * What language to use for syntax highlighting */ lang: 'bash' | 'clojure' | 'css' | 'curl' | 'go' | 'graphql' | 'java' | 'javascript' | 'json' | 'node' | 'php' | 'python' | 'ruby' | 'shell' | 'svelte' | 'swift' | 'tsx' | 'typescript' | 'xml' | 'html'; /** * Only show the first `n` lines of code, and render a button to "show more". * Set to 0 to show all. */ lineClamp?: number; /** * Hide or show the copy button. Defaults to `true`. */ showCopyButton?: boolean; /** * Use to disable scrollbars and hand over scrolling to the parent. */ scroll?: ComponentProps['direction']; /** * Preferred max width of lines in the code block. */ printWidth?: number; /** * Show line numbers, defaults to true */ lineNumbers?: boolean; /** * Padding around the code block. Defaults to `sm`. */ padding?: 'none' | 'sm' | 'md'; /** * Use a different background color to match background with raised elements. For example `bg={2}` when rendering * a Code component in a Drawer. */ bg?: 1 | 2 | 3; }; export declare function Code({ children, lang, caption, lineClamp, showCopyButton, lineNumbers, scroll, printWidth, bg, padding, }: CodeProps): React.JSX.Element; export {};