Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast customizable type not working? #194

Open
juanpb1 opened this issue Aug 28, 2024 Discussed in #193 · 1 comment
Open

Toast customizable type not working? #194

juanpb1 opened this issue Aug 28, 2024 Discussed in #193 · 1 comment

Comments

@juanpb1
Copy link

juanpb1 commented Aug 28, 2024

Discussed in #193

Originally posted by juanpb1 August 28, 2024
onPress={() => toast.show('test toast custom', { type: "custom", animationDuration: 100, data: { title: "Toast custom" } })}
OR

onPress={() => toast.show('test toast custom', { type: "custom-toast", animationDuration: 100, data: { title: "Toast custom" } })}

Could anyone help me?

@fe55o
Copy link

fe55o commented Dec 29, 2024

The type of the toast should be based on what you provided in the app.js file
<ToastProvider renderType={{ custom_toast1: CutomToast1Component, custom-toast2: CustomToast2Component, }} > <NavigationScreens SplashScreen={SplashScreen} /> </NavigationContainer> </ToastProvider>
so if i want to show the custom toast number 1 I should call it like so
onPress={() => toast.show('test toast custom', { type: "custom_toast1", animationDuration: 100, data: { title: "Toast custom" } })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants