import {Pressable, View} from 'react-native' import {show as deprecatedShow} from '#/view/com/util/Toast' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {toast} from '#/components/Toast' import {Toast} from '#/components/Toast/Toast' import {H1} from '#/components/Typography' export function Toasts() { return (

Toast Examples

toast.show({ type: 'default', content: 'Default toast', a11yLabel: 'Default toast', }) }> toast.show({ type: 'default', content: 'Default toast, 6 seconds', a11yLabel: 'Default toast, 6 seconds', duration: 6e3, }) }> toast.show({ type: 'default', content: 'This is a longer message to test how the toast handles multiple lines of text content.', a11yLabel: 'This is a longer message to test how the toast handles multiple lines of text content.', }) }> toast.show({ type: 'success', content: 'Success toast', a11yLabel: 'Success toast', }) }> toast.show({ type: 'info', content: 'Info toast', a11yLabel: 'Info toast', }) }> toast.show({ type: 'warning', content: 'Warning toast', a11yLabel: 'Warning toast', }) }> toast.show({ type: 'error', content: 'Error toast', a11yLabel: 'Error toast', }) }>
) }