Skip to content

A demo of react-native-snackbar-component and react-native-fab working together!

Notifications You must be signed in to change notification settings

sidevesh/snackbar-and-fab-demo

Repository files navigation

snackbar-and-fab-demo

A demo of react-native-snackbar-component and react-native-fab working together!

Whenever the snackbar updates, either when it moves in or out or maybe the content changes increasing or decreasing its height, the snackbar wil call the function given as distanceCallback prop with the new height taken by it as argument. Use this to update the distanceOffset value at state or store.

Supply this value to fab as snackOffset prop, and now the fab will move itself if snackbar moves.

See index.android.js for working example.