chore: update notifcations drawer design (#8469)
This commit is contained in:
1 parent
bbb891e5c1
commit
04044c984b
1 file changed
+15
-14
+15
-14
@@ -1,19 +1,18 @@
|
|||||||
import {
|
import {
|
||||||
BellAlert,
|
BellAlert,
|
||||||
BellAlertDone,
|
BellAlertDone,
|
||||||
CircleFilledSolid,
|
|
||||||
InformationCircleSolid,
|
InformationCircleSolid,
|
||||||
} from "@medusajs/icons"
|
} from "@medusajs/icons"
|
||||||
import { Drawer, Heading, IconButton, Text } from "@medusajs/ui"
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
import { clx, Drawer, Heading, IconButton, Text } from "@medusajs/ui"
|
||||||
|
import { formatDistance } from "date-fns"
|
||||||
|
import { TFunction } from "i18next"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import { useTranslation } from "react-i18next"
|
import { useTranslation } from "react-i18next"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
|
||||||
import { formatDistance } from "date-fns"
|
|
||||||
import { InfiniteList } from "../../common/infinite-list"
|
|
||||||
import { sdk } from "../../../lib/client"
|
|
||||||
import { notificationQueryKeys, useNotifications } from "../../../hooks/api"
|
import { notificationQueryKeys, useNotifications } from "../../../hooks/api"
|
||||||
import { TFunction } from "i18next"
|
import { sdk } from "../../../lib/client"
|
||||||
import { FilePreview } from "../../common/file-preview"
|
import { FilePreview } from "../../common/file-preview"
|
||||||
|
import { InfiniteList } from "../../common/infinite-list"
|
||||||
|
|
||||||
interface NotificationData {
|
interface NotificationData {
|
||||||
title: string
|
title: string
|
||||||
@@ -132,15 +131,17 @@ const Notification = ({
|
|||||||
<InformationCircleSolid />
|
<InformationCircleSolid />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-full flex-col gap-y-3">
|
<div className="flex w-full flex-col gap-y-3">
|
||||||
<div>
|
<div className="flex flex-col">
|
||||||
<div className="items-center flex flex-row justify-between">
|
<div className="items-center flex justify-between">
|
||||||
<Text size="small" leading="compact" weight="plus">
|
<Text size="small" leading="compact" weight="plus">
|
||||||
{data.title}
|
{data.title}
|
||||||
</Text>
|
</Text>
|
||||||
<div className="items-center flex flex-row justify-center pr-4 relative">
|
<div className="items-center flex justify-center align-center gap-2">
|
||||||
<Text
|
<Text
|
||||||
as={"span"}
|
as={"span"}
|
||||||
className="text-ui-fg-subtle"
|
className={clx("text-ui-fg-subtle", {
|
||||||
|
"text-ui-fg-base": unread,
|
||||||
|
})}
|
||||||
size="small"
|
size="small"
|
||||||
leading="compact"
|
leading="compact"
|
||||||
weight="plus"
|
weight="plus"
|
||||||
@@ -150,9 +151,9 @@ const Notification = ({
|
|||||||
})}
|
})}
|
||||||
</Text>
|
</Text>
|
||||||
{unread && (
|
{unread && (
|
||||||
<CircleFilledSolid
|
<div
|
||||||
className="text-ui-fg-interactive absolute top-1 right-0"
|
className="h-2 w-2 rounded bg-ui-bg-interactive"
|
||||||
style={{ transform: "scale(0.3)" }}
|
role="status"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user