Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

editorsnotes/rebass-autosuggest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pass any props taken by either the rebass Input component or the react-autosuggest Autosuggest component:

<Autosuggest
  p={1}
  style={{border: '1px solid red'}}
  name="snack"
  label="Snack"
  suggestions={this.state.suggestions}
  onSuggestionsFetchRequested={({value}) => {
    this.setState({suggestions: getSuggestions(value)})
  }}
  onSuggestionsClearRequested={() => {
    this.setState({suggestions: []})
  }}
  getSuggestionValue={suggestion => suggestion.label}
  renderSuggestion={suggestion => suggestion.label}
  inputProps={
    { value: this.state.value
    , onChange: (e, {newValue}) => {
        this.setState({value: newValue})
      }
    }
  }
/>


About

Style react-autosuggest using rebass

Resources

Stars

Watchers

Forks

Packages

No packages published