import { IonButton, IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar, useIonAlert, } from '@ionic/react'; const Alert = () => { const [present] = useIonAlert(); return ( Alert Alert present({ cssClass: 'my-css', header: 'Alert', message: 'alert from hook', buttons: ['Cancel', { text: 'Ok', handler: (d) => console.log('ok pressed') }], onDidDismiss: (e) => console.log('did dismiss'), }) } > Show Alert present('hello with params', [{ text: 'Ok' }])}> Show Alert using params ); }; export default Alert;