diff options
Diffstat (limited to 'src/lib/Notification/options.ts')
| -rw-r--r-- | src/lib/Notification/options.ts | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/lib/Notification/options.ts b/src/lib/Notification/options.ts index be972a7e..28eeecb3 100644 --- a/src/lib/Notification/options.ts +++ b/src/lib/Notification/options.ts @@ -1,24 +1,26 @@ -type Position = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; +type Position = "top-right" | "top-left" | "bottom-right" | "bottom-left"; export interface Options { - heading: string; - description?: string; - position: Position; - duration: number; - id: string; + heading: string; + description?: string; + position: Position; + duration: number; + id: string; } export const options = (preferences: { - heading: string; - description?: string; - position?: string; - duration?: number; + heading: string; + description?: string; + position?: string; + duration?: number; }): Options => { - return { - position: (preferences.position || 'top-right') as Position, - duration: preferences.duration || 3000, - heading: preferences.heading, - description: preferences.description, - id: Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15) - }; + return { + position: (preferences.position || "top-right") as Position, + duration: preferences.duration || 3000, + heading: preferences.heading, + description: preferences.description, + id: + Math.random().toString(36).substring(2, 15) + + Math.random().toString(36).substring(2, 15), + }; }; |