Skip to content

Commit 2684b63

Browse files
Merge pull request #212 from jeremy-deutsch/close-action-type
Add TypeScript definition for closeAction method
2 parents 0da0bf1 + 0183bd6 commit 2684b63

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

index.d.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ export interface DropdownAlertProps {
6262
| 'error'
6363
| 'custom'
6464
| 'success'
65+
export type CloseActionType =
66+
| 'automatic'
67+
| 'programmatic'
68+
| 'tap'
69+
| 'pan'
70+
| 'cancel'
6571
export default class DropdownAlert extends React.Component<
6672
DropdownAlertProps
6773
> {
@@ -72,13 +78,11 @@ export interface DropdownAlertProps {
7278
payload?: object,
7379
interval?: number,
7480
): void
81+
closeAction(
82+
action?: CloseActionType,
83+
onDone?: () => void,
84+
): void
7585
}
76-
export type CloseActionType =
77-
| 'automatic'
78-
| 'programmatic'
79-
| 'tap'
80-
| 'pan'
81-
| 'cancel'
8286
export type AlertDataType = {
8387
type: DropdownAlertType
8488
title: string

0 commit comments

Comments
 (0)