react-styleguidist
Version:
React components style guide generator
35 lines (34 loc) • 994 B
TypeScript
import React, { Component } from 'react';
import { StyleGuideContextContents } from 'rsg-components/Context';
interface PlaygroundProps {
evalInContext(code: string): () => any;
index: number;
name?: string;
exampleMode?: string;
code: string;
settings: {
showcode?: boolean;
noeditor?: boolean;
padded?: boolean;
props?: any;
};
}
interface PlaygroundState {
code: string;
prevCode: string;
activeTab?: string;
}
declare class Playground extends Component<PlaygroundProps, PlaygroundState> {
static contextType: React.Context<StyleGuideContextContents>;
private handleChange;
state: PlaygroundState;
static getDerivedStateFromProps(nextProps: PlaygroundProps, prevState: PlaygroundState): {
prevCode: string;
code: string;
} | null;
componentWillUnmount(): void;
private getInitialActiveTab;
private handleTabChange;
render(): JSX.Element;
}
export default Playground;