UNPKG

1.26 kBTypeScriptView Raw
1import React, { Component } from 'react';
2import { KnobControlConfig, KnobControlProps } from './types';
3declare type CheckboxesTypeKnobValue = string[];
4export interface CheckboxesTypeKnob extends KnobControlConfig<CheckboxesTypeKnobValue> {
5 options: Record<string, string>;
6}
7interface CheckboxesTypeProps extends KnobControlProps<CheckboxesTypeKnobValue>, CheckboxesWrapperProps {
8 knob: CheckboxesTypeKnob;
9}
10interface CheckboxesTypeState {
11 values: CheckboxesTypeKnobValue;
12}
13interface CheckboxesWrapperProps {
14 isInline: boolean;
15}
16export default class CheckboxesType extends Component<CheckboxesTypeProps, CheckboxesTypeState> {
17 static defaultProps: CheckboxesTypeProps;
18 static propTypes: {
19 knob: React.Validator<CheckboxesTypeKnob>;
20 onChange: React.Validator<(value: CheckboxesTypeKnobValue) => CheckboxesTypeKnobValue>;
21 isInline: React.Validator<boolean>;
22 };
23 static serialize: (value: CheckboxesTypeKnobValue) => CheckboxesTypeKnobValue;
24 static deserialize: (value: CheckboxesTypeKnobValue) => CheckboxesTypeKnobValue;
25 constructor(props: CheckboxesTypeProps);
26 private handleChange;
27 private renderCheckboxList;
28 private renderCheckbox;
29 render(): JSX.Element;
30}
31export {};