import React from "react";
import { InputNumberProps } from "antd";
import { CustomInputNumber } from "./AntInputNumberStyles";
import { InputContainer, LabelText, ErrorText } from "../AntInputStyles";
export interface AntInputNumberProps extends InputNumberProps {
  errorText?: string;
  labelText?: string;
}
export const InputNumber: React.FC<AntInputNumberProps> = (props) => {
    const { status, errorText, labelText } = props;
    return (
      <InputContainer>
      <LabelText>{labelText}</LabelText>
        <CustomInputNumber {...props} />
        {status == "error" ? <ErrorText>{errorText}</ErrorText> : null}
      </InputContainer>
    );
}