Skip to content

Commit ce6b37b

Browse files
committed
feat : 토스트 컨텐츠 타입별 이모지 추가
1 parent b99a781 commit ce6b37b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Toast.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export default function Toast({}: Toast) {
99
const setToastUnActive = useToastStore((state) => state.setToastUnActive);
1010

1111
const TOAST_DESIGN = {
12-
Warning: { style: 'bg-primary-3' },
13-
Success: { style: 'bg-[#38d9a9] text-[#FFFFFF]' },
14-
Error: { style: 'bg-[#FFDCD8] text-[#FF0000]' },
15-
Info: { style: 'bg-[#FFFFFF]' },
12+
Warning: { style: 'bg-primary-4', imoji: '⚠️' },
13+
Success: { style: 'bg-[#38d9a9] text-[#FFFFFF]', imoji: '✅' },
14+
Error: { style: 'bg-[#FFDCD8] text-[#FF0000]', imoji: '🚨' },
15+
Info: { style: 'bg-[#FFFFFF]', imoji: 'ℹ️' },
1616
};
1717

1818
const animation = `toast-blink ${toastObj.time}s ease-in-out forwards`;
@@ -33,7 +33,7 @@ export default function Toast({}: Toast) {
3333
if (!isActive) return null;
3434
return (
3535
<div className={toastStyle} style={{ animation: animation }} onClick={() => setToastUnActive()}>
36-
{toastObj.content}
36+
{`${TOAST_DESIGN[toastObj.toastType].imoji} ${toastObj.content} ${TOAST_DESIGN[toastObj.toastType].imoji}`}
3737
</div>
3838
);
3939
}

0 commit comments

Comments
 (0)