File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,32 @@ export type NativeSheetDetent = "medium" | "large" | `fraction:${number}` | `hei
1010export type NativeSheetProps = {
1111 isPresented ?: boolean ;
1212 detents ?: NativeSheetDetent [ ] ;
13+ title ?: string ;
14+ message ?: string ;
15+ primaryButtonTitle ?: string ;
16+ secondaryButtonTitle ?: string ;
17+ } ;
18+
19+ export type NativeSheetEvents = {
1320 onDismiss ?: ( ) => void ;
21+ onPrimaryAction ?: ( ) => void ;
22+ onSecondaryAction ?: ( ) => void ;
1423} ;
1524
16- export const Sheet : FunctionComponentWithId < PropsWithChildren < NativeSheetProps > > = ( {
25+ export type SheetProps = NativeSheetProps & NativeSheetEvents ;
26+
27+ export const Sheet : FunctionComponentWithId < PropsWithChildren < SheetProps > > = ( {
1728 children,
1829 onDismiss,
30+ onPrimaryAction,
31+ onSecondaryAction,
1932 ...otherProps
2033} ) => {
21- const { id } = useSwiftUINode ( "Sheet" , otherProps , { dismiss : onDismiss } ) ;
34+ const { id } = useSwiftUINode ( "Sheet" , otherProps , {
35+ dismiss : onDismiss ,
36+ primaryAction : onPrimaryAction ,
37+ secondaryAction : onSecondaryAction ,
38+ } ) ;
2239 return < SwiftUIParentIdProvider id = { id } > { children } </ SwiftUIParentIdProvider > ;
2340} ;
2441Sheet . displayName = "Sheet" ;
You can’t perform that action at this time.
0 commit comments