Bluesky app fork with some witchin' additions 馃挮
at main 29 lines 708 B view raw
1import {type toast as sonner} from 'sonner-native' 2 3/** 4 * This is not exported from `sonner-native` so just hacking it in here. 5 */ 6export type ExternalToast = Exclude< 7 Parameters<typeof sonner.custom>[1], 8 undefined 9> 10 11export type ToastType = 'default' | 'success' | 'error' | 'warning' | 'info' 12 13/** 14 * Not all properties are available on all platforms, so we pick out only those 15 * we support. Add more here as needed. 16 */ 17export type BaseToastOptions = Pick< 18 ExternalToast, 19 'duration' | 'dismissible' | 'promiseOptions' 20> & { 21 type?: ToastType 22 23 /** 24 * These methods differ between web/native implementations 25 */ 26 onDismiss?: () => void 27 onPress?: () => void 28 onAutoClose?: () => void 29}