1import { useRef } from 'react';
2import {
3 FlutterCupertinoModalPopup,
4 FlutterCupertinoModalPopupElement,
5} from '@openwebf/react-cupertino-ui';
6
7export function ModalPopupExample() {
8 const ref = useRef<FlutterCupertinoModalPopupElement>(null);
9
10 return (
11 <>
12 <FlutterCupertinoModalPopup ref={ref} height={240} onClose={() => console.log('Closed')}>
13 <div style={{ padding: 16 }}>Your content here…</div>
14 </FlutterCupertinoModalPopup>
15 <button onClick={() => ref.current?.show()}>Open Modal</button>
16 </>
17 );
18}