This commit is contained in:
Liam DeBeasi
2024-01-30 09:42:45 -05:00
parent e021eadb81
commit b3c1ab2f76
4 changed files with 7 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import type { AnimationBuilder, Mode } from '../../interface';
import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface';
export interface ActionSheetOptions {
header?: string;
@@ -19,7 +19,7 @@ export interface ActionSheetOptions {
export interface ActionSheetButton<T = any> {
text?: string;
role?: 'cancel' | 'destructive' | 'selected' | string;
role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>;
icon?: string;
cssClass?: string | string[];
id?: string;

View File

@@ -1,4 +1,4 @@
import type { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface';
import type { IonicSafeString } from '../../utils/sanitization';
export interface AlertOptions {
@@ -45,7 +45,7 @@ type AlertButtonOverlayHandler = boolean | void | { [key: string]: any };
export interface AlertButton {
text: string;
role?: 'cancel' | 'destructive' | string;
role?: LiteralUnion<'cancel' | 'destructive', string>;
cssClass?: string | string[];
id?: string;
htmlAttributes?: { [key: string]: any };

View File

@@ -1,4 +1,4 @@
import type { AnimationBuilder, Color, Mode } from '../../interface';
import type { AnimationBuilder, Color, LiteralUnion, Mode } from '../../interface';
import type { IonicSafeString } from '../../utils/sanitization';
export interface ToastOptions {
@@ -33,8 +33,7 @@ export interface ToastButton {
text?: string;
icon?: string;
side?: 'start' | 'end';
role?: 'cancel' | string;
role?: LiteralUnion<'cancel', string>;
/**
* @deprecated Use the toast button's CSS Shadow Parts instead.
*/

View File

@@ -131,7 +131,7 @@ export type PredefinedColors =
| 'medium'
| 'dark';
type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
export type Color = LiteralUnion<PredefinedColors, string>;
export type Mode = 'ios' | 'md';