in packages-rc/console-base-rc-input/stories/knobs/index.tsx [19:65]
export default function Knobs({
onChange
}: IProps): null {
const placeholder = text('props.placeholder', '');
const disabled = boolean('props.disabled', false);
const block = boolean('props.block', false);
const round = boolean('props.round', false);
const weakFocusStyle = boolean('props.weakFocusStyle', false);
const borderless = boolean('props.borderless', false);
const hasClear = boolean('props.hasClear', false);
const innerLeft = text('props.innerLeft', '');
const innerRight = text('props.innerRight', '');
const status = radios('props.status', {
loading: 'loading',
success: 'success',
error: 'error',
none: ''
}, '');
const props = useMemo(() => ({
placeholder,
disabled,
block,
round,
weakFocusStyle,
borderless,
hasClear,
innerLeft,
innerRight,
status: status as InputProps['status']
}), [
placeholder,
disabled,
block,
round,
weakFocusStyle,
borderless,
hasClear,
innerLeft,
innerRight,
status
]);
useEffect(() => onChange(props), [onChange, props]);
return null;
}