@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
38 lines (37 loc) • 1.12 kB
TypeScript
import { CodeLanguageType } from '../types';
/** The props type of [[`ICodeToolBar`]]. */
export interface ICodeToolBar {
/**
* Code resource to be used for copying
*/
code: string;
/**
* Status to determine if is showing the full code or the preview code
*/
codeOpen: boolean;
/**
* The language for the code using, will used to show the language in the toolbar
*/
language?: CodeLanguageType;
/**
* Determine if the expand button is enabled
*/
showPreview: boolean;
/**
* Callback function for when the expand button is clicked
* @returns Void
*/
onCodeOpenChange: () => void;
/**
* Callback function for open in sandbox, if available, the code sandbox button will be shown
* @returns Void
*/
onOpenInSandbox?: () => void;
/**
* Translation function
* @param translate string that needs to be translated
* @returns translated string
*/
t: (translate: string) => string;
}
export declare const CodeToolBar: (props: ICodeToolBar) => import("react/jsx-runtime").JSX.Element;