Skip to content

Instantly share code, notes, and snippets.

@martinwairegi
Created February 4, 2022 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinwairegi/7f4ee1ca12706f93b755258e5bb9ff9c to your computer and use it in GitHub Desktop.
Save martinwairegi/7f4ee1ca12706f93b755258e5bb9ff9c to your computer and use it in GitHub Desktop.
render() {
return (
<View>
<Button title={'Press me'} onPress={()=>{
this.toast.show('hello world!',2000);
}}/>
<Toast
ref={(toast) => this.toast = toast}
style={{backgroundColor:'red'}}
position='top'
positionValue={200}
fadeInDuration={750}
fadeOutDuration={1000}
opacity={0.8}
textStyle={{color:'red'}}
/>
</View>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment