0.1.4 • Published 5 years ago

react-native-suggester v0.1.4

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

react-native-suggester

React-Native package to decorate TextInput and get suggestions with good UX

How to use it ?

import { SuggesterProvider, SuggestTextInput } from 'react-native-suggester'

const DATA = [
  { id: 1, value: 'Honda' },
  { id: 2, value: 'BMW' },
  { id: 3, value: 'Harley-Davidson' },
  { id: 4, value: 'Yamaha' },
  { id: 5, value: 'Kawasaki' },
  { id: 6, value: 'Triumph' },
  { id: 8, value: 'Ducati' },
  { id: 9, value: 'Suzuki' },
]

export default class App extends React.Component {
  render() {
    return (
      <SuggesterProvider>
        {/* somewhere in your app */}
        <SuggestTextInput name="field1" data={DATA} style={styles.input} />
      </SuggesterProvider>
    )
  }
}

With HOC

import {
  SuggesterProvider,
  SuggestTextInput,
  setSuggestOptions,
} from 'react-native-suggester'

setSuggestOptions({
  statusBarHeight: 10,
  backgroundColor: 'white',
  textColor: 'black',
  textFont: 'System',
  textFontSize: 16,
  textWhenEmpty: '...',
})

@SuggesterProvider
class App extends React.Component {
  render() {
    return (
      <View>
        {/* somewhere in your app */}
        <SuggestTextInput name="field1" data={DATA} style={styles.input} />
      </View>
    )
  }
}

Hire an expert!

Looking for a ReactNative freelance expert with more than 12 years experience? Contact me from my website!

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago