1.0.3 • Published 8 years ago

@hnordt/reax-input v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Reax Input

Bootstrap Input component for React

npm version

DEPRECATED

The Input component is too generic.

As we like to keep things simple, we have deprecated Input. We are now using tiny components like TextInput, Checkbox, PasswordInput and others.

Please look at https://www.npmjs.com/~hnordt to find them.

PropTypes

{
  type: PropTypes.oneOf([
    'checkbox',
    'color',
    'date',
    'datetime',
    'datetime-local',
    'email',
    'file',
    'hidden',
    'month',
    'number',
    'password',
    'radio',
    'range',
    'search',
    'tel',
    'text',
    'time',
    'url',
    'week'
  ]),
  name: PropTypes.string,
  value: PropTypes.oneOfType([
    PropTypes.string,
    PropTypes.number,
    PropTypes.bool
  ]),
  placeholder: PropTypes.string,
  maxLength: PropTypes.number,
  minLength: PropTypes.number,
  max: PropTypes.number,
  min: PropTypes.number,
  step: PropTypes.number,
  autoFocus: PropTypes.bool,
  checked: PropTypes.bool,
  readOnly: PropTypes.bool,
  disabled: PropTypes.bool,
  leftAddon: PropTypes.node,
  rightAddon: PropTypes.node
}

Usage

npm install --save @hnordt/reax-input
import React from 'react';
import Input from '@hnordt/reax-input';
import Icon from '@hnordt/reax-icon';

const Foo = () => (
  <Input type="email" value="foo@bar.com" leftAddon={<Icon name="envelope" />} />
);

export default Foo;
1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago