arnnis / react-native-toast-notifications

Toast component for React Native, supports Android, iOS and Web
562 stars 89 forks source link

Custom toast not working #185

Open aldiabdumalik opened 7 months ago

aldiabdumalik commented 7 months ago

Why my custom toast not working?

<Provider store={store}>
      <WithSplashScreen>
        <ToastProvider
          // successIcon={<IconCheckCircle width={14} height={14} color="#27AE60" />}
          renderType={{
            custom_type: (toast) => (
              <View style={{ padding: 15, backgroundColor: 'red' }}>
                <Text>{toast.message}aaaa</Text>
              </View>
            )
          }}
        >
          <GestureHandlerRootView style={{ flex: 1 }}>
          ....
RivetParallel commented 5 months ago

you must change custom_type to type example: "success" , "danger" ,"warning". renderType={{ danger: (toast) => ( <View style={{ padding: 15, backgroundColor: "grey", }} className="w-full"

{toast.message}

), }}