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

Toasts aren't working on iOS devices #10

Closed
starfreck opened this issue Apr 14, 2023 · 6 comments
Closed

Toasts aren't working on iOS devices #10

starfreck opened this issue Apr 14, 2023 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@starfreck
Copy link

Toasts aren't working on iOS devices. It only shows a very small toast banner with no message inside. It works fine with Android.

@pauloeduardoferreira
Copy link

same here...

1 similar comment
@QianZhongWang
Copy link

same here...

@kuasha420 kuasha420 added the help wanted Extra attention is needed label Aug 1, 2023
@deeeed
Copy link

deeeed commented Aug 23, 2023

You need to add a width in the snackbarStyle.
I patched it locally by setting it in the common style.

const common: ViewStyle = {
  borderRadius: 3,
  minWidth: 250,
};

@deemyboy
Copy link

deemyboy commented Oct 6, 2023

@deeeed where did you write that code?

@deemyboy
Copy link

deemyboy commented Oct 7, 2023

if you remove your react-native-paper-toast and then use either of these

yarn:
yarn add https://github.com/kuasha420/react-native-paper-toast#3b474847a5275ed586a41d283301986f23fe8b90

npm:
npm install https://github.com/kuasha420/react-native-paper-toast#3b474847a5275ed586a41d283301986f23fe8b90

you will get the ability to add 3 new properties to the toast - snackbarStyle, messageStyle and messageContainerStyle

I'm using 2 of the new properties and the 'minWidth' fixes the very thin green snackbar (no text visible) and the 'flexDirection: 'row'' fixes the stacked layout (Icon above the text - now it's inline)

toaster.show({ type: type, message: message, snackbarStyle: { minWidth: 300 }, messageContainerStyle: { flex: 1, flexDirection: 'row' } });

@kuasha420
Copy link
Owner

Fixed in latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants