import { useState } from "react"; interface MessagePreviewProps { title: string; body: string; hasImage: boolean; appName?: string; variant?: "large" | "small"; } // 폰 배경 이미지 (밝은 그래디언트 배경) const PHONE_BG = "https://lh3.googleusercontent.com/aida-public/AB6AXuDmbD5msJ9uegWOcy0256wH6JsipGzrgtab3foEKiGVs_a4SbUCTPti6BVDJOQEP4ZCvbcAw9hI3C7QuUdPxrBf3jJm3VgKkWoqSzl--ZEbPIzimbYnM1HQEsRbil7nmWG_XscwPP30V3OFnyleVY_R7Urk0UYbrL8P1OJwW1xwYfBDJv4htBuICd9GR2NIJlSShaBxfF9Kgp59Cte3VapdHxCz9p2Cb9tf1t13xc2LV348V-kfyQNtL8XCZNP3LMrrUIR4SrV3cGM"; export default function MessagePreview({ title, body, hasImage, appName = "SPMS", variant = "large", }: MessagePreviewProps) { const [tab, setTab] = useState<"ios" | "android">("ios"); const isLarge = variant === "large"; const phoneWidth = isLarge ? "w-[300px]" : "w-[240px]"; const truncatedBody = body.length > 50 ? body.substring(0, 50) + "..." : body; return (
Banner Notification
{title || "메시지 제목을 입력하세요"}
{body}
now
{hasImage && (Full Screen Preview
{title || "메시지 제목을 입력하세요"}
{truncatedBody}
now
Banner Notification
{appName}
·now
{title || "메시지 제목을 입력하세요"}
{body}
Full Screen Preview
{appName}
·now
expand_more{title || "메시지 제목을 입력하세요"}
{truncatedBody}
이 미리보기는 예상 디자인입니다.
실제 표시는 기기 설정 및 OS 버전에 따라 다를 수 있습니다.