feat: 개인/외교 메시지 수신시 버튼 추가
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { BButton } from "bootstrap-vue-3";
|
||||
import type { ToastContent } from "bootstrap-vue-3/dist/components/BToast/plugin";
|
||||
import { h } from "vue";
|
||||
|
||||
type CallbackType = (type: "goto" | "ignore", e: MouseEvent) => void;
|
||||
|
||||
export function getNewMsgToast(title: string, body: string, callback: CallbackType): ToastContent{
|
||||
const bodyNode = h(
|
||||
"span",
|
||||
null,
|
||||
[
|
||||
body,
|
||||
h(BButton, { variant: "primary", size: "sm", onClick: (e)=>{ callback('goto', e) } }, "보러가기"),
|
||||
h(BButton, { variant: "secondary", size: "sm", onClick: (e)=>{ callback('ignore', e)} }, "이미읽음"),
|
||||
]
|
||||
);
|
||||
return {
|
||||
title,
|
||||
body: bodyNode,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user