import { UseKnobOptions } from './types'; import { useKnob } from './useKnob'; type UseNumberKnobSpecificOptions = { min?: number | string; max?: number | string; step?: number | string; }; type UseNumberKnobOptions = UseKnobOptions & UseNumberKnobSpecificOptions; export const useNumberKnob = (options: UseNumberKnobOptions) => { const { initialValue = 0, min = 0, max = undefined, step = '1', ...rest } = options; return useKnob>({ initialValue, type: 'number', min, max, step, ...rest, }); };