1 | import React, { PureComponent } from 'react';
|
2 | import { API } from '@storybook/api';
|
3 | import { KnobStoreKnob } from '../KnobStore';
|
4 | export declare const DEFAULT_GROUP_ID = "Other";
|
5 | interface KnobPanelProps {
|
6 | active: boolean;
|
7 | onReset?: object;
|
8 | api: Pick<API, 'on' | 'off' | 'emit' | 'getQueryParam' | 'setQueryParams'>;
|
9 | }
|
10 | interface KnobPanelState {
|
11 | knobs: Record<string, KnobStoreKnob>;
|
12 | }
|
13 | interface KnobPanelOptions {
|
14 | timestamps?: boolean;
|
15 | }
|
16 | export default class KnobPanel extends PureComponent<KnobPanelProps> {
|
17 | static propTypes: {
|
18 | active: React.Validator<boolean>;
|
19 | onReset: React.Validator<object | undefined>;
|
20 | api: React.Validator<Pick<API, "on" | "off" | "emit" | "getQueryParam" | "setQueryParams">>;
|
21 | };
|
22 | static defaultProps: KnobPanelProps;
|
23 | state: KnobPanelState;
|
24 | options: KnobPanelOptions;
|
25 | lastEdit: number;
|
26 | loadedFromUrl: boolean;
|
27 | mounted: boolean;
|
28 | componentDidMount(): void;
|
29 | componentWillUnmount(): void;
|
30 | setOptions: (options?: KnobPanelOptions) => void;
|
31 | setKnobs: ({ knobs, timestamp, }: {
|
32 | knobs: Record<string, KnobStoreKnob>;
|
33 | timestamp?: number | undefined;
|
34 | }) => void;
|
35 | reset: () => void;
|
36 | copy: () => void;
|
37 | emitChange: (changedKnob: KnobStoreKnob) => void;
|
38 | handleChange: (changedKnob: KnobStoreKnob) => void;
|
39 | handleClick: (knob: KnobStoreKnob) => void;
|
40 | stopListeningOnStory: Function;
|
41 | render(): JSX.Element | null;
|
42 | }
|
43 | export {};
|