Skip to content

Commit

Permalink
better formatting for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Breed committed Aug 20, 2014
1 parent 36add84 commit d8f8133
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ a typeahead that allows you to select multiple results.

For a typeahead input:

```
var Typeahead = require('react-typeahead').Typeahead;
React.renderComponent(Typeahead({
options: ['John', 'Paul', 'George', 'Ringo'],
maxVisible: 2
});
```javascript
var Typeahead = require('react-typeahead').Typeahead;
React.renderComponent(Typeahead({
options: ['John', 'Paul', 'George', 'Ringo'],
maxVisible: 2
});
```
For a tokenizer typeahead input:
```
var Tokenizer = require('react-typeahead').Tokenizer;
React.renderComponent(Typeahead({
options: ['John', 'Paul', 'George', 'Ringo'],
onTokenAdd: function(token) {
console.log('token added: ', token);
}
});
```javascript
var Tokenizer = require('react-typeahead').Tokenizer;
React.renderComponent(Typeahead({
options: ['John', 'Paul', 'George', 'Ringo'],
onTokenAdd: function(token) {
console.log('token added: ', token);
}
});
```
## Examples
Expand Down Expand Up @@ -87,13 +87,13 @@ Type: `Function`
Event handler triggered whenever a user picks an option
---
### Tokenizer(props)
Type: React Component
Typeahead component that handles allows for multiple options to be
selected.
Typeahead component that allows for multiple options to be selected.
#### props.options
Expand Down

0 comments on commit d8f8133

Please sign in to comment.