feat: allow specifying mui icon for notification

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2023-12-18 08:34:51 +02:00
parent fb8fc24df0
commit 62141acaee
10 changed files with 98 additions and 30 deletions
+6 -1
View File
@@ -3,6 +3,8 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import * as muiIcons from '@material-ui/icons';
// @public (undocumented)
type Notification_2 = {
id: string;
@@ -10,7 +12,7 @@ type Notification_2 = {
title: string;
description: string;
link: string;
icon?: string;
icon?: NotificationIcon;
image?: string;
created: Date;
read?: Date;
@@ -18,6 +20,9 @@ type Notification_2 = {
};
export { Notification_2 as Notification };
// @public (undocumented)
export type NotificationIcon = keyof typeof muiIcons;
// @public (undocumented)
export type NotificationIds = {
ids: string[];
+4 -1
View File
@@ -28,5 +28,8 @@
},
"files": [
"dist"
]
],
"dependencies": {
"@material-ui/icons": "^4.9.1"
}
}
+6 -2
View File
@@ -14,9 +14,14 @@
* limitations under the License.
*/
import * as muiIcons from '@material-ui/icons';
/** @public */
export type NotificationType = 'read' | 'unread' | 'saved';
/** @public */
export type NotificationIcon = keyof typeof muiIcons;
/** @public */
export type Notification = {
id: string;
@@ -24,8 +29,7 @@ export type Notification = {
title: string;
description: string;
link: string;
// TODO: Icon should be typed so that we know what to render
icon?: string;
icon?: NotificationIcon;
image?: string;
created: Date;
read?: Date;