@mantine/code-highlight
Version:
Code highlight with Mantine theme
34 lines (33 loc) • 1.62 kB
TypeScript
import { BoxProps, PolymorphicFactory, StylesApiProps } from '@mantine/core';
export interface CodeHighlightControlProps extends BoxProps, StylesApiProps<CodeHighlightControlFactory> {
/** Control icon */
children?: React.ReactNode;
/** Label displayed in the tooltip when the control is hovered */
tooltipLabel?: string;
}
export type CodeHighlightControlFactory = PolymorphicFactory<{
props: CodeHighlightControlProps;
defaultRef: HTMLButtonElement;
defaultComponent: 'button';
}>;
export declare const CodeHighlightControl: (<C = "button">(props: import("@mantine/core").PolymorphicComponentProps<C, CodeHighlightControlProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(CodeHighlightControlProps & {
component?: any;
} & Omit<Omit<any, "ref">, keyof CodeHighlightControlProps | "component"> & {
ref?: any;
renderRoot?: (props: any) => any;
}) | (CodeHighlightControlProps & {
component: React.ElementType;
renderRoot?: (props: Record<string, any>) => any;
})>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{
props: CodeHighlightControlProps;
defaultRef: HTMLButtonElement;
defaultComponent: "button";
}> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{
props: CodeHighlightControlProps;
defaultRef: HTMLButtonElement;
defaultComponent: "button";
}> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
props: CodeHighlightControlProps;
defaultRef: HTMLButtonElement;
defaultComponent: "button";
}> & Record<string, never>;