1 import { Container, Text } from "@medusajs/ui";
2 import { Link } from "react-router-dom";
3 import { AdminGiftCard } from "../../../../../types";
4 import { Header } from "../../../../components/header";
5
6 const GiftCardNoteSection = ({ giftCard }: { giftCard: AdminGiftCard }) => {
7 if (!giftCard) {
8 return;
9 }
10
11 return (
12 <Container className="p-0">
13 <div className="flex items-center justify-between">
14 <Header title="Note" />
15
16 <Link to="note" className="text-ui-fg-muted text-sm px-6">
17 Edit note
18 </Link>
19 </div>
20
21 {giftCard.note && (
22 <div className="flex flex-col gap-2 px-2 pb-2">
23 <div className="shadow-elevation-card-rest bg-ui-bg-component transition-fg hover:bg-ui-bg-component-hover active:bg-ui-bg-component-pressed group-focus-visible:shadow-borders-interactive-with-active rounded-md px-4 py-2">
24 <div className="flex items-center gap-4">
25 <div className="flex flex-1 flex-col">
26 <Text
27 size="small"
28 leading="compact"
29 className="text-ui-fg-subtle"
30 >
31 {giftCard.note ?? ""}
32 </Text>
33 </div>
34 </div>
35 </div>
36 </div>
37 )}
38 </Container>
39 );
40 };
41
42 export default GiftCardNoteSection;