Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
Something went wrong. Try again.
2.5 kB · 81 lines
TypeScript
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182import {type ColorValue, type NativeSyntheticEvent} from 'react-native'
export type BottomSheetState = 'closed' | 'closing' | 'open' | 'opening'
export type BottomSheetPopoverMode = 'always' | 'adaptive' | 'never'
export enum BottomSheetSnapPoint { Hidden, Partial, Full,}
export type BottomSheetAttemptDismissEvent = NativeSyntheticEvent<object>export type BottomSheetSnapPointChangeEvent = NativeSyntheticEvent<{ snapPoint: BottomSheetSnapPoint}>export type BottomSheetStateChangeEvent = NativeSyntheticEvent<{ state: BottomSheetState}>export type BottomSheetPresentationSizeChangeEvent = NativeSyntheticEvent<{ width: number height: number /** Whether UIKit is currently presenting this surface as a floating popover. */ isPopover: boolean /** * Insets inside the reported content frame. Popovers report zero because * their host is already safe-area inset. */ safeAreaInsets: { top: number right: number bottom: number left: number } /** * Distance between the reported content frame's bottom and the presentation * window's bottom. */ bottomOffset: number}>
export interface BottomSheetViewProps { children: React.ReactNode cornerRadius?: number preventDismiss?: boolean preventExpansion?: boolean backgroundColor?: ColorValue containerBackgroundColor?: ColorValue /** * The app's colour scheme, which can differ from the system appearance. iOS * applies it to the native chrome, such as the popover's glass. Ignored on * Android. */ colorScheme?: 'light' | 'dark' disableDrag?: boolean sourceViewTag?: number /** * iOS presentation policy. Defaults to 'never' (a sheet). * 'adaptive' uses a popover in regular width and a sheet in compact width. * 'always' keeps the anchored popover even on iPhone and compact iPad windows. * Ignored on Android. */ popover?: BottomSheetPopoverMode /** * Preferred width for iOS popovers, in points. Defaults to 320. */ popoverWidth?: number
fullHeight?: boolean minHeight?: number maxHeight?: number /** Intrinsic content height used to size the sheet when its viewport is constrained. */ desiredContentHeight?: number
onAttemptDismiss?: (event: BottomSheetAttemptDismissEvent) => void onSnapPointChange?: (event: BottomSheetSnapPointChangeEvent) => void onStateChange?: (event: BottomSheetStateChangeEvent) => void onPresentationSizeChange?: ( event: BottomSheetPresentationSizeChangeEvent, ) => void}