-
Notifications
You must be signed in to change notification settings - Fork 252
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
Can break the line with \n or <br> #447
Comments
This is not really the most intuitive but it works for me: // App.tsx
import React, { useEffect } from 'react';
import type { BaseToastProps } from 'react-native-toast-message';
import { BaseToast, ErrorToast, InfoToast } from 'react-native-toast-message';
const toastConfig = {
success: (props: BaseToastProps) => (
<BaseToast {...props} text2NumberOfLines={3} />
),
error: (props: BaseToastProps) => (
<ErrorToast {...props} text2NumberOfLines={3} />
),
info: (props: BaseToastProps) => (
<InfoToast {...props} text2NumberOfLines={3} />
),
};
const App = () => {
return (
<Toast config={toastConfig} />
);
};
export default App; |
@maddeye Info Toast config is not working for me, text is still Truncated with "..." at the end. Even if I change borderLeftColor its not applyed to InfoToast, but for ErrorToast styles and numberOfLines is applied |
Can you share yor code snippet? |
|
This is not hardcoded, it's a default value when you don't define something yourself. Sorry i see nothing wrong on your config. I'm not sure why it does not work for you |
I have the same issue:
|
@tgmarinho |
It would simply be an observation to facilitate a line break with a "\n" for example so that we can make texts a little bigger. I apologize if for reasons this detail already exists, but so far I haven't found anything related!
The text was updated successfully, but these errors were encountered: