UNPKG

vue-styleguidist

Version:
46 lines (45 loc) 1.77 kB
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { JssInjectedProps } from 'rsg-components/Styled'; export interface UnconfiguredEditorProps extends JssInjectedProps { code: string; jssThemedEditor: boolean; jsxInExamples: boolean; onChange: (val: string) => void; editorPadding?: number; } export declare class UnconfiguredEditor extends Component<UnconfiguredEditorProps> { static propTypes: { classes: PropTypes.Validator<{ [x: string]: string; }>; code: PropTypes.Validator<string>; jssThemedEditor: PropTypes.Validator<boolean>; jsxInExamples: PropTypes.Validator<boolean>; onChange: PropTypes.Validator<(...args: any[]) => any>; editorPadding: PropTypes.Requireable<number>; }; state: { code: string; prevCode: string; highlight: (lang: "html" | "jsx" | "vue-sfc" | "vsg" | "tsx", jsxInExamples?: boolean | undefined) => (code: string, errorLoc?: import("vue-inbrowser-prismjs-highlighter").VueAllPrismError | undefined) => string; }; static getDerivedStateFromProps(nextProps: UnconfiguredEditorProps, prevState: { code: string; prevCode: string; }): { prevCode: string; code: string; } | null; componentDidMount(): void; shouldComponentUpdate(nextProps: UnconfiguredEditorProps, nextState: { code: string; prevCode: string; }): boolean; private loadHighlightCode; handleChange: (code: string) => void; render(): JSX.Element; } type EditorProps = Omit<UnconfiguredEditorProps, 'jssThemedEditor' | 'jsxInExamples'>; declare const _default: React.ComponentType<Omit<EditorProps, "classes">>; export default _default;