feat: Add notification actions

This commit is contained in:
2024-01-26 08:48:27 +01:00
parent 2d2d47f55f
commit 0507722ecf
24 changed files with 1967 additions and 172 deletions
@@ -1,9 +1,9 @@
import { NotificationActions } from "../../action/NotificationActions";
import { NotificationListItemProps } from "../../notification";
import { Detail, List, environment } from "@raycast/api";
import { useMemo } from "react";
import { NotificationActions } from "../../NotificationActions";
import { NotificationListItemProps } from "../../types";
export function GoogleMailNotificationListItem({ notification }: NotificationListItemProps) {
export function GoogleMailNotificationListItem({ notification, mutate }: NotificationListItemProps) {
const icon = useMemo(() => {
if (environment.appearance === "dark") {
return "google-mail-logo-light.svg";
@@ -18,7 +18,11 @@ export function GoogleMailNotificationListItem({ notification }: NotificationLis
icon={icon}
subtitle={`#${notification.source_id}`}
actions={
<NotificationActions notification={notification} detailsTarget={<Detail markdown="# To be implemented 👋" />} />
<NotificationActions
notification={notification}
detailsTarget={<Detail markdown="# To be implemented 👋" />}
mutate={mutate}
/>
}
/>
);