You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
917 B
TypeScript
35 lines
917 B
TypeScript
// frontend/components/mail/Sug.tsx — 아리 제안 항목 (할 일 / 일정)
|
|
"use client";
|
|
import type { ReactNode } from "react";
|
|
import { Icon } from "@/components/Icon";
|
|
|
|
export function Sug({
|
|
kind,
|
|
text,
|
|
meta,
|
|
added,
|
|
onAdd,
|
|
}: {
|
|
kind: "task" | "event";
|
|
text: string;
|
|
meta: ReactNode;
|
|
added: boolean;
|
|
onAdd: () => void;
|
|
}) {
|
|
return (
|
|
<div className={"sug " + kind + (added ? " added" : "")}>
|
|
<div className="sug-ico">
|
|
<Icon name={kind === "task" ? "check" : "cal"} />
|
|
</div>
|
|
<div className="sug-main">
|
|
<div className="sug-text">{text}</div>
|
|
<div className="sug-meta">{meta}</div>
|
|
</div>
|
|
<button className={"sug-add" + (added ? " done" : "")} onClick={onAdd}>
|
|
<Icon name={added ? "tick" : "plus"} w={added ? 3 : 1.9} />
|
|
{added ? "추가됨" : kind === "task" ? "작업" : "일정"}
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|