Animated toast message component for React Native
MIT License
Bot releases are hidden (Show)
Published by calintamas 30 days ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.2.0...v2.2.1
Published by calintamas 10 months ago
Gestures can now be disabled using the swipeable: boolean
option; they are still enabled by default. by @wouterds in https://github.com/calintamas/react-native-toast-message/pull/446
Toast.show({ ..., swipeable: false })
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.10...v2.2.0
Published by calintamas 10 months ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.9...v2.1.10
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.8...v2.1.9
Published by calintamas 11 months ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.7...v2.1.8
Published by calintamas 12 months ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.6...v2.1.7
Published by calintamas over 1 year ago
text1
or text2
is an empty string by @zzy-33 in https://github.com/calintamas/react-native-toast-message/pull/352
visibilityTime
. The value is in milliseconds, not seconds by @johnbillion in https://github.com/calintamas/react-native-toast-message/pull/429
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.5...v2.1.6
Published by calintamas over 2 years ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.4...v2.1.5
Published by calintamas over 2 years ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.3...v2.1.4
Published by calintamas over 2 years ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.2...v2.1.3
Published by calintamas over 2 years ago
Full Changelog: https://github.com/calintamas/react-native-toast-message/compare/v2.1.1...v2.1.2
Published by calintamas almost 3 years ago
After a Toast is shown within a Modal, the main instance outside of Modal doesn't work anymore (#293)
A previously set timer is not cleared when autoHide
changes from true
to false
. This can make a newly shown Toast auto hide (even if it was shown with autoHide: false
) (#294)
Big thanks go to jstheoriginal for all the work on fixing the two issues above 🙌.
Flexbox not working for setting Toast width or alignment (3400f00)
Published by calintamas almost 3 years ago
Setting the ref
is no longer required when rendering the Toast
component in your app's entry point. Ref storage is now handled internally using React.createRef. This should improve ref access reliability at runtime.
// App.jsx
import Toast from 'react-native-toast-message';
export function App(props) {
return (
<>
{/* ... */}
<Toast />
</>
);
}
When you want to have the Toast visible inside a Modal, you no longer need to set a separate ref
.
Simply render the Toast
component inside the Modal, as well as in your app's entry point. When the Modal is visible, the ref
from inside the Modal will be automatically used.
onHide
callback is now always called when the Toast hides (does not matter if autoHide
was true
/ false
).
inProgress
state has been removed and can no longer be relied upon in a custom Toast config.
style
and height
props from the Toast component were removed; with the purpose of achieving a cleaner API design. The only way to change the style / layout of different Toast types is through the config
prop (fixes #204).
on the BaseToast
component, the following props were added: touchableContainerProps
, contentContainerProps
, text1Props
, text2Props
, text1NumberOfLines
, text2NumberOfLines
(fixes #112, #133).
on the Toast
component, the following callbacks were added as props: onShow
, onHide
and onPress
(fixes #143).
A new ToastShowParams
type is exported (fixes #192).
topOffset
and bottomOffset
are now by default 40px
BaseToast
component: toastTouchableContainer
, toastContentContainer
, toastText1
and toastText2
.Success, error and info leading icons were removed from the package (to make it as lightweight as possible).
It's now possible to pass them via render functions (for more flexibility, see issues regarding svg support, using components as icons, etc) on BaseToast
component, example below:
const toastConfig = {
success: (props) => (
<BaseToast
{...props}
renderLeadingIcon={() => <Image />}
renderTrailingIcon={() => <Image />}
/>
)
}
Trailing close icon has been removed from default components BaseToast
, SuccessToast
, ErrorToast
and InfoToast
. Fixes #167.