diff --git a/README.md b/README.md index a64413dc..b8f55fc6 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ React-based typeahead component that uses standard the Bootstrap theme for as a [![npm](https://img.shields.io/npm/v/react-bootstrap-typeahead.svg?style=flat-square)](https://www.npmjs.com/package/react-bootstrap-typeahead) [![npm](https://img.shields.io/npm/dm/react-bootstrap-typeahead.svg?style=flat-square)](https://www.npmjs.com/package/react-bootstrap-typeahead) +Please note that this library is under active development and the APIs may change. + ## Installation Use NPM to install the module in your project and build using a tool like webpack or browserify. diff --git a/package.json b/package.json index 39b01bcf..d856193d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-bootstrap-typeahead", - "version": "0.2.1", + "version": "0.2.2", "description": "React-based typeahead using the Bootstrap theme", "main": "lib/index.js", "directories": { diff --git a/src/Token.react.js b/src/Token.react.js index e4309f4a..b74f1c8d 100644 --- a/src/Token.react.js +++ b/src/Token.react.js @@ -1,6 +1,6 @@ 'use strict'; -import React from 'react'; +import React, {PropTypes} from 'react'; import {findDOMNode} from 'react-dom'; import cx from 'classnames'; @@ -25,7 +25,7 @@ const Token = React.createClass({ * Handler for removing/deleting the token. If not defined, the token will * be rendered in a read-only state. */ - onRemove: React.PropTypes.func, + onRemove: PropTypes.func, }, getInitialState() { diff --git a/src/TokenizerInput.react.js b/src/TokenizerInput.react.js index d1dc8c98..a7408daa 100644 --- a/src/TokenizerInput.react.js +++ b/src/TokenizerInput.react.js @@ -1,15 +1,13 @@ 'use strict'; import AutosizeInput from 'react-input-autosize'; -import React from 'react'; +import React, {PropTypes} from 'react'; import Token from './Token.react'; import cx from 'classnames'; import {findDOMNode} from 'react-dom'; import keyCode from './keyCode'; -const {PropTypes} = React; - /** * TokenizerInput * diff --git a/src/Typeahead.react.js b/src/Typeahead.react.js index fec04f8c..aef02c96 100644 --- a/src/Typeahead.react.js +++ b/src/Typeahead.react.js @@ -1,6 +1,6 @@ 'use strict'; -import React from 'react'; +import React, {PropTypes} from 'react'; import TokenizerInput from './TokenizerInput.react'; import TypeaheadInput from './TypeaheadInput.react'; @@ -10,8 +10,6 @@ import {find, head, isEmpty, isEqual, uniqueId} from 'lodash'; import {BACKSPACE, DOWN, ESC, RETURN, TAB, UP} from './keyCode'; import onClickOutside from 'react-onclickoutside'; -const {PropTypes} = React; - require('../css/Typeahead.css'); /** diff --git a/src/TypeaheadInput.react.js b/src/TypeaheadInput.react.js index ea8ac479..ff3cf639 100644 --- a/src/TypeaheadInput.react.js +++ b/src/TypeaheadInput.react.js @@ -1,14 +1,12 @@ 'use strict'; -import React from 'react'; +import React, {PropTypes} from 'react'; import cx from 'classnames'; import {head} from 'lodash'; import keyCode from './keyCode'; import onClickOutside from 'react-onclickoutside'; -const {PropTypes} = React; - /** * TypeaheadInput * diff --git a/src/TypeaheadMenu.react.js b/src/TypeaheadMenu.react.js index 4982be33..dc3b0b15 100644 --- a/src/TypeaheadMenu.react.js +++ b/src/TypeaheadMenu.react.js @@ -1,13 +1,11 @@ 'use strict'; import Highlight from 'react-highlighter'; -import React from 'react'; +import React, {PropTypes} from 'react'; import {findDOMNode} from 'react-dom'; import cx from 'classnames'; -const {PropTypes} = React; - const Menu = React.createClass({ render() { return (