fumadocs-ui
Version:
The Radix UI version of Fumadocs UI
63 lines (62 loc) • 1.86 kB
TypeScript
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
import * as react_jsx_runtime34 from "react/jsx-runtime";
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
//#region src/components/codeblock.d.ts
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;
}
declare function Pre(props: ComponentProps<'pre'>): react_jsx_runtime34.JSX.Element;
declare function CodeBlock({
ref,
title,
allowCopy,
keepBackground,
icon,
viewportProps,
children,
Actions,
...props
}: CodeBlockProps): react_jsx_runtime34.JSX.Element;
declare function CodeBlockTabs({
ref,
...props
}: ComponentProps<typeof Tabs>): react_jsx_runtime34.JSX.Element;
declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): react_jsx_runtime34.JSX.Element;
declare function CodeBlockTabsTrigger({
children,
...props
}: ComponentProps<typeof TabsTrigger>): react_jsx_runtime34.JSX.Element;
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime34.JSX.Element;
//#endregion
export { CodeBlock, CodeBlockProps, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
//# sourceMappingURL=codeblock.d.ts.map