-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from josemarluedke/feat/notifications-testing
Allow notifications to skipTimer and clear timer on removal
- Loading branch information
Showing
7 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import config from 'ember-get-config'; | ||
import { DefaultConfig } from './types'; | ||
import { getWithDefault } from '@ember/object'; | ||
|
||
export function getConfigOption<T extends keyof DefaultConfig>( | ||
key: T, | ||
defaultValue: NonNullable<DefaultConfig[T]> | undefined | ||
): NonNullable<DefaultConfig[T]> { | ||
return getWithDefault( | ||
config['@frontile/notifications'] || ({} as never), | ||
key as never, | ||
defaultValue as never | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
import Notification from './-private/notification'; | ||
import Timer from './-private/timer'; | ||
import NotificationsService from './services/notifications'; | ||
import { NotificationOptions, CustomAction } from './-private/types'; | ||
import { | ||
DefaultConfig, | ||
NotificationOptions, | ||
CustomAction | ||
} from './-private/types'; | ||
|
||
export { | ||
Notification, | ||
Timer, | ||
NotificationsService, | ||
NotificationOptions, | ||
DefaultConfig, | ||
CustomAction | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters