Package Exports
- react-native-cool-snackbar
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-cool-snackbar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-cool-snackbar
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'),
}}
/>