one
Version:
One is a React framework for web, iOS, and Android apps.
48 lines (47 loc) • 1.93 kB
text/typescript
// generated by bun run generate from the SwiftUI SDK and codegen/catalog.ts.
// edit the generator or catalog, then regenerate.
import type { ReactNode } from 'react'
import type { ColorValue, ViewProps } from 'react-native'
import type { PresentationContentInteraction, Visibility } from './swiftui'
export type PresentationDetent =
| 'medium'
| 'large'
| { fraction: number }
| { height: number }
export type PresentationBackgroundInteraction =
| 'automatic'
| 'enabled'
| 'disabled'
| { enabledUpThrough: PresentationDetent }
export type PresentationSizing = 'automatic' | 'fitted' | 'form' | 'page'
export interface SheetProps extends ViewProps {
isPresented: boolean
onIsPresentedChange: (value: boolean) => void
onDismiss?: () => void
/** fires after the presented native content leaves its window following an accepted close. */
onDidDismiss?: () => void
revision?: number
presentationDetents?: readonly PresentationDetent[]
fitToContents?: boolean
selectedDetent?: PresentationDetent
onSelectedDetentChange?: (detent: PresentationDetent) => void
detentRevision?: number
presentationDragIndicator?: Visibility
interactiveDismissDisabled?: boolean
presentationBackground?: ColorValue
presentationBackgroundInteraction?: PresentationBackgroundInteraction
presentationContentInteraction?: PresentationContentInteraction
presentationSizing?: PresentationSizing
children: ReactNode
}
// a full screen cover has no detents and no drag indicator, so it takes neither. it is
// dismissed from React, or from a control the presented content supplies.
export interface FullScreenCoverProps extends ViewProps {
isPresented: boolean
onIsPresentedChange: (value: boolean) => void
onDismiss?: () => void
/** fires after the presented native content leaves its window following an accepted close. */
onDidDismiss?: () => void
revision?: number
children: ReactNode
}