-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathaction-sheet-interface.ts
More file actions
36 lines (33 loc) · 1.07 KB
/
action-sheet-interface.ts
File metadata and controls
36 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import type { OverlayOptions } from '@utils/overlays-interface';
import type { LiteralUnion } from '../../interface';
export interface ActionSheetOptions extends OverlayOptions {
header?: string;
subHeader?: string;
cssClass?: string | string[];
buttons: (ActionSheetButton | string)[];
backdropDismiss?: boolean;
translucent?: boolean;
keyboardClose?: boolean;
htmlAttributes?: { [key: string]: any };
}
export interface ActionSheetButton<T = any> {
text?: string | HTMLElement;
role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>;
icon?: string;
cssClass?: string | string[];
id?: string;
htmlAttributes?: { [key: string]: any };
handler?: () => boolean | void | Promise<boolean | void>;
data?: T;
/**
* When `disabled` is `true` the action
* sheet button will not be interactive. Note
* that buttons with a 'cancel' role cannot
* be disabled as that would make it difficult for
* users to dismiss the action sheet.
*/
disabled?: boolean;
startContent?: HTMLElement;
endContent?: HTMLElement;
description?: string;
}