fumadocs-ui
Version:
The framework for building a documentation website in Next.js
42 lines • 1.74 kB
TypeScript
import { type ComponentProps, type HTMLAttributes, type ReactNode } from 'react';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/tabs.unstyled.js';
export interface CodeBlockProps extends ComponentProps<'figure'> {
/**
* Icon of code block
*
* When passed as a string, it assumes the value is the HTML of icon
*/
icon?: ReactNode;
/**
* Allow to copy code with copy button
*
* @defaultValue true
*/
allowCopy?: boolean;
/**
* Keep original background color generated by Shiki or Rehype Code
*
* @defaultValue false
*/
keepBackground?: boolean;
viewportProps?: HTMLAttributes<HTMLElement>;
/**
* show line numbers
*/
'data-line-numbers'?: boolean;
/**
* @defaultValue 1
*/
'data-line-numbers-start'?: number;
Actions?: (props: {
className?: string;
children?: ReactNode;
}) => ReactNode;
}
export declare function Pre(props: ComponentProps<'pre'>): import("react/jsx-runtime").JSX.Element;
export declare function CodeBlock({ ref, title, allowCopy, keepBackground, icon, viewportProps, children, Actions, ...props }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
export declare function CodeBlockTabs({ ref, ...props }: ComponentProps<typeof Tabs>): import("react/jsx-runtime").JSX.Element;
export declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): import("react/jsx-runtime").JSX.Element;
export declare function CodeBlockTabsTrigger({ children, ...props }: ComponentProps<typeof TabsTrigger>): import("react/jsx-runtime").JSX.Element;
export declare const CodeBlockTab: typeof TabsContent;
//# sourceMappingURL=codeblock.d.ts.map