mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
chore(all): sync with main for beta 7
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { PopoverOptions, popoverController } from '@ionic/core/components';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { HookOverlayOptions } from './HookOverlayOptions';
|
||||
import { ReactComponentOrElement, useOverlay } from './useOverlay';
|
||||
@ -17,9 +18,9 @@ export function useIonPopover(component: ReactComponentOrElement, componentProps
|
||||
componentProps
|
||||
);
|
||||
|
||||
function present(options: Omit<PopoverOptions, 'component' | 'componentProps'> & HookOverlayOptions = {}) {
|
||||
const present = useCallback((options: Omit<PopoverOptions, 'component' | 'componentProps'> & HookOverlayOptions = {}) => {
|
||||
controller.present(options as any);
|
||||
};
|
||||
}, [controller.present]);
|
||||
|
||||
return [
|
||||
present,
|
||||
|
Reference in New Issue
Block a user