npm.io
1.2.1 • Published 7 years ago

react-native-cool-snackbar

Licence
MIT
Version
1.2.1
Deps
3
Size
195 kB
Vulns
0
Weekly
0

react-native-cool-snackbar

picture

Snackbar component for React-native

Props

prop type required and default
message string required (no default)
isActive bool required (false)
duration oneOf('short','long') not required (short)
action object not required (no defalut)

action object when provided should look like

action type required
title string yes
color string yes
onPress func yes
duration timing
short (default) 2200ms
long 3500ms

Example

See this expo snack to see how to use Snackbar

In your render method
 <SnackBar
    message="Mail sent !"
    isActive={true}                             //conditionally set to true
    action={{                                   //optional
      title: 'RESEND',
      color: 'green',
      onPress: () => console.log('done'),
    }}
  />

Keywords