Skip to content

Commit 2809b04

Browse files
author
Kyle Andrews
committed
Initial Notification Manager rework
1 parent 998c7a3 commit 2809b04

File tree

5 files changed

+305
-137
lines changed

5 files changed

+305
-137
lines changed

global.d.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
export { Notify };
21

3-
export as namespace Notify;
42

5-
declare class Notify {
6-
constructor(options:Notify.NotifyOptions);
3+
interface NotificationButton
4+
{
5+
label: string,
6+
callback: Function,
7+
ariaLabel?: string,
78
}
89

9-
declare namespace Notify{
10-
export interface NotifyOptions{
11-
message: string;
12-
actions?: Array<{ label:string, value:string }>;
13-
callback?: Function;
14-
duration?: number;
15-
closeable?: boolean;
16-
}
10+
interface SnackbarNotification
11+
{
12+
message: string,
13+
duration?: number,
14+
closeable?: boolean,
15+
buttons?: Array<NotificationButton>,
16+
position?: string,
17+
element?: HTMLElement,
18+
}
19+
20+
interface VerificationResponse
21+
{
22+
validNotification: SnackbarNotification,
23+
warnings: Array<string>,
1724
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codewithkyle/notifyjs",
3-
"version": "0.1.0",
4-
"description": "A simple JavaScript library for creating snackbar notifications",
3+
"version": "0.2.0",
4+
"description": "A simple JavaScript library for creating and managing snackbar notifications",
55
"main": "Notify.js",
66
"types": "global.d.ts",
77
"files": [

src/Global.d.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)