Convert all remaining files to typescript.
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { notifHasImg } from "../../utils.js";
|
||||
|
||||
const Image = (notif) => {
|
||||
if (notifHasImg(notif)) {
|
||||
return Widget.Box({
|
||||
class_name: "notification-card-image-container menu",
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
vexpand: false,
|
||||
child: Widget.Box({
|
||||
hpack: "center",
|
||||
vexpand: false,
|
||||
class_name: "notification-card-image menu",
|
||||
css: `background-image: url("${notif.image}")`,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
return Widget.Box();
|
||||
};
|
||||
|
||||
export { Image };
|
||||
23
modules/menus/notifications/notification/image/index.ts
Normal file
23
modules/menus/notifications/notification/image/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Notification } from "types/service/notifications";
|
||||
import { notifHasImg } from "../../utils.js";
|
||||
|
||||
const Image = (notif: Notification) => {
|
||||
if (notifHasImg(notif)) {
|
||||
return Widget.Box({
|
||||
class_name: "notification-card-image-container menu",
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
vexpand: false,
|
||||
child: Widget.Box({
|
||||
hpack: "center",
|
||||
vexpand: false,
|
||||
class_name: "notification-card-image menu",
|
||||
css: `background-image: url("${notif.image}")`,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
return Widget.Box();
|
||||
};
|
||||
|
||||
export { Image };
|
||||
Reference in New Issue
Block a user