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

feat: Override message text style #6

Closed
kidculli opened this issue Nov 21, 2022 · 5 comments
Closed

feat: Override message text style #6

kidculli opened this issue Nov 21, 2022 · 5 comments

Comments

@kidculli
Copy link

Great lib, thanks for making this !

One suggestion I have is the ability to override the message style.
Currently its not configurable.

We could introduce a new prop called messageStyle that we can pass to the Text component.

Let me know what you think.

@kidculli
Copy link
Author

Actually it seems like this PR solves the issue, can we get it merged ?

#5

@deemyboy
Copy link

+1

@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' } });

@deemyboy
Copy link

deemyboy commented Oct 7, 2023

the above fix actualises the solution in @kidculli comment on 21 Nov 2022

#5

@kuasha420
Copy link
Owner

Included in latest release.

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

3 participants