UNPKG

1.25 kBTypeScriptView Raw
1import React, { Component } from 'react';
2import { KnobControlConfig, KnobControlProps } from './types';
3export declare type RadiosTypeKnobValue = string | number | null | undefined;
4export declare type RadiosTypeOptionsProp<T extends RadiosTypeKnobValue> = Record<string | number, T>;
5export interface RadiosTypeKnob extends KnobControlConfig<RadiosTypeKnobValue> {
6 options: RadiosTypeOptionsProp<RadiosTypeKnobValue>;
7}
8interface RadiosTypeProps extends KnobControlProps<RadiosTypeKnobValue>, RadiosWrapperProps {
9 knob: RadiosTypeKnob;
10}
11interface RadiosWrapperProps {
12 isInline: boolean;
13}
14declare class RadiosType extends Component<RadiosTypeProps> {
15 static defaultProps: RadiosTypeProps;
16 static propTypes: {
17 knob: React.Validator<RadiosTypeKnob>;
18 onChange: React.Validator<(value: string | number | null | undefined) => string | number | null | undefined>;
19 isInline: React.Validator<boolean>;
20 };
21 static serialize: (value: RadiosTypeKnobValue) => string | number | null | undefined;
22 static deserialize: (value: RadiosTypeKnobValue) => string | number | null | undefined;
23 private renderRadioButtonList;
24 private renderRadioButton;
25 render(): JSX.Element;
26}
27export default RadiosType;