import React, { FC } from 'react';
import NumberInputOriginal, { NumberFormatProps } from 'react-number-format';
import { BaseInput, BaseInputProps } from '../BaseInput';

export const NumberInput: FC<NumberFormatProps & BaseInputProps> = (props) => {
  const { name, ...otherProps } = props;

  return (
    <NumberInputOriginal
      customInput={BaseInput}
      name={name}
      id={name}
      {...otherProps}
    />
  );
};
