/**
 * Created by Jeff Fohl <jfohl@h2o.ai> on 7/12/16.
 */

import * as React from 'react';
import * as classNames from 'classnames';
import './styles/numericinput.scss';

interface INumericInputProps {
  name: string,
  min: number,
  max?: number
}

export class NumericInput extends React.Component<INumericInputProps, any> {

  public static defaultProps: INumericInputProps = { min : 0} as INumericInputProps;

  render(): React.ReactElement<HTMLInputElement> {
    return (
      <input className="numeric-input" type="number" name={this.props.name} min={this.props.min} max={this.props.max} />
    );
  }
}
