Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update notifcations drawer design #8469

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import {
BellAlert,
BellAlertDone,
CircleFilledSolid,
InformationCircleSolid,
} from "@medusajs/icons"
import { Drawer, Heading, IconButton, Text } from "@medusajs/ui"
import { useEffect, useState } from "react"
import { useTranslation } from "react-i18next"
import { HttpTypes } from "@medusajs/types"
import { clx, Drawer, Heading, IconButton, Text } from "@medusajs/ui"
import { formatDistance } from "date-fns"
import { InfiniteList } from "../../common/infinite-list"
import { sdk } from "../../../lib/client"
import { notificationQueryKeys, useNotifications } from "../../../hooks/api"
import { TFunction } from "i18next"
import { useEffect, useState } from "react"
import { useTranslation } from "react-i18next"
import { notificationQueryKeys, useNotifications } from "../../../hooks/api"
import { sdk } from "../../../lib/client"
import { FilePreview } from "../../common/file-preview"
import { InfiniteList } from "../../common/infinite-list"

interface NotificationData {
title: string
Expand Down Expand Up @@ -132,15 +131,17 @@ const Notification = ({
<InformationCircleSolid />
</div>
<div className="flex w-full flex-col gap-y-3">
<div>
<div className="items-center flex flex-row justify-between">
<div className="flex flex-col">
<div className="items-center flex justify-between">
<Text size="small" leading="compact" weight="plus">
{data.title}
</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
as={"span"}
className="text-ui-fg-subtle"
className={clx("text-ui-fg-subtle", {
"text-ui-fg-base": unread,
})}
size="small"
leading="compact"
weight="plus"
Expand All @@ -150,9 +151,9 @@ const Notification = ({
})}
</Text>
{unread && (
<CircleFilledSolid
className="text-ui-fg-interactive absolute top-1 right-0"
style={{ transform: "scale(0.3)" }}
<div
className="h-2 w-2 rounded bg-ui-bg-interactive"
role="status"
/>
)}
</div>
Expand Down
Loading