diff --git a/example/src/examples/ModalSheetViewTest01.tsx b/example/src/examples/ModalSheetViewTest01.tsx index 50badd9a..0712b2ca 100644 --- a/example/src/examples/ModalSheetViewTest01.tsx +++ b/example/src/examples/ModalSheetViewTest01.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ import * as React from 'react'; -import { StyleSheet, Text } from 'react-native'; +import { StyleSheet, Text, TouchableOpacity } from 'react-native'; import { ExampleItemCard, ObjectPropertyDisplay, CardButton, Colors } from 'react-native-ios-utilities'; import { ModalSheetView, ModalSheetViewContent, type ModalSheetViewRef } from 'react-native-ios-modal'; @@ -27,7 +27,12 @@ export function ModalSheetViewTest01(props: ExampleItemProps) { { + onPress={async () => { + await modalSheetViewRef.current?.presentModal(); + console.log( + 'ModalSheetViewTest01', + '\n - present modal completed' + ); }} /> - - {'Hello World'} - + + + { + await modalSheetViewRef.current?.dismissModal(); + console.log( + 'ModalSheetViewTest01', + '\n - dismiss modal completed' + ); + }} + /> + @@ -46,11 +68,17 @@ export function ModalSheetViewTest01(props: ExampleItemProps) { }; const styles = StyleSheet.create({ + debugDisplayInner: { + backgroundColor: `${Colors.PURPLE[200]}99`, + }, modalContent: { + flex: 1, alignItems: 'center', justifyContent: 'center', + paddingHorizontal: 12, + paddingVertical: 24, }, - debugDisplayInner: { - backgroundColor: `${Colors.PURPLE[200]}99`, + modalContentCard: { + alignSelf: 'stretch', }, }); \ No newline at end of file