import {Pressable, View} from 'react-native' import {show as deprecatedShow} from '#/view/com/util/Toast' import {atoms as a} from '#/alf' import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe' import * as Toast from '#/components/Toast' import {H1} from '#/components/Typography' function DefaultToast({ content, type = 'default', }: { content: string type?: Toast.ToastType }) { return ( {content} ) } function ToastWithAction() { return ( This toast has an action button console.log('Action clicked!')}> Action ) } function LongToastWithAction() { return ( This is a longer message to test how the toast handles multiple lines of text content. console.log('Action clicked!')}> Action ) } export function Toasts() { return (

Toast Examples

Toast.show(, {type: 'success'})}> Toast.show(, {type: 'error'})}> Toast.show()}> Toast.show(`Hey I'm a toast!`)}> Toast.show(`This toast will disappear after 6 seconds`, { duration: 6e3, }) }> Toast.show( `This is a longer message to test how the toast handles multiple lines of text content.`, ) }> Toast.show(`Success! Yayyyyyyy :)`, { type: 'success', }) }> Toast.show(`I'm providing info!`, { type: 'info', }) }> Toast.show(`This is a warning toast`, { type: 'warning', }) }> Toast.show(`This is an error toast :(`, { type: 'error', }) }> deprecatedShow( `This is a test of the deprecated API`, 'exclamation-circle', ) }>
) }