fix(react): fixing type of icon in ToastOptions, ActionSheetOptions, fixes #20100

This commit is contained in:
Ely Lucas
2019-12-17 10:42:15 -07:00
parent 4bc3dc73c1
commit 432887b410
3 changed files with 38 additions and 3 deletions

View File

@ -1,5 +1,22 @@
import { ActionSheetOptions, actionSheetController } from '@ionic/core';
import { ActionSheetButton as ActionSheetButtonCore, ActionSheetOptions as ActionSheetOptionsCore, actionSheetController as actionSheetControllerCore } from '@ionic/core';
import { createOverlayComponent } from './createOverlayComponent';
export interface ActionSheetButton extends Omit<ActionSheetButtonCore, 'icon'> {
icon?: {
ios: string;
md: string;
};
}
export interface ActionSheetOptions extends Omit<ActionSheetOptionsCore, 'buttons'> {
buttons?: (ActionSheetButton | string)[];
}
const actionSheetController = {
create: (options: ActionSheetOptions) => actionSheetControllerCore.create(options as any),
dismiss: (data?: any, role?: string | undefined, id?: string | undefined) => actionSheetControllerCore.dismiss(data, role, id),
getTop: () => actionSheetControllerCore.getTop()
};
export const IonActionSheet = /*@__PURE__*/createOverlayComponent<ActionSheetOptions, HTMLIonActionSheetElement>('IonActionSheet', actionSheetController);