-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 알림 * fix
- Loading branch information
Showing
8 changed files
with
130 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use client'; | ||
|
||
import { Icon } from '@/system/components'; | ||
import { TouchButton } from '../TouchButton'; | ||
import { color } from '@/system/token/color'; | ||
import { useNotificationContext } from './context'; | ||
import { AnimatePresence, motion } from 'framer-motion'; | ||
import { Spacing } from '@/system/utils/Spacing'; | ||
|
||
export function NotificationWindow() { | ||
const { isOpen, close } = useNotificationContext(); | ||
|
||
return ( | ||
<AnimatePresence> | ||
{isOpen && ( | ||
<motion.div | ||
initial={{ opacity: 0, x: -100 }} | ||
animate={{ opacity: 1, x: 0 }} | ||
exit={{ opacity: 0, x: -30 }} | ||
className="z-[10000] absolute top-16 left-16 bottom-16 w-368 bg-neutral-90 rounded-20 p-20 flex flex-col"> | ||
<div className="flex justify-between"> | ||
<h1 className="text-neutral-1 text-heading2 font-semibold">알림</h1> | ||
<TouchButton onClick={close}> | ||
<Icon name="x" color={color.neutral40} /> | ||
</TouchButton> | ||
</div> | ||
<div className="flex-1 flex items-center justify-center"> | ||
<div className="flex flex-col gap-24"> | ||
<Icon name="IllustAlarm" /> | ||
<div className="flex flex-col items-center gap-4"> | ||
<h2 className="text-neutral-10 text-body1 font-normal">지금은 알림이 없어요</h2> | ||
<p className="text-caption2 font-regular text-neutral-35">알림은 30일 뒤에 자동으로 사라져요</p> | ||
</div> | ||
</div> | ||
</div> | ||
<Spacing size={100} /> | ||
</motion.div> | ||
)} | ||
</AnimatePresence> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use client'; | ||
|
||
import { generateContext } from '@/lib'; | ||
import { useState } from 'react'; | ||
|
||
interface NotificationContext { | ||
isOpen: boolean; | ||
open: () => void; | ||
close: () => void; | ||
toggle: () => void; | ||
} | ||
|
||
const [NotificationWrapper, useNotificationContext] = generateContext<NotificationContext>({ | ||
name: 'Notification', | ||
}); | ||
|
||
function NotificatinProvider({ children }: { children: React.ReactNode }) { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const open = () => setIsOpen(true); | ||
|
||
const close = () => setIsOpen(false); | ||
|
||
const toggle = () => setIsOpen((prev) => !prev); | ||
|
||
return ( | ||
<NotificationWrapper isOpen={isOpen} open={open} close={close} toggle={toggle}> | ||
{children} | ||
</NotificationWrapper> | ||
); | ||
} | ||
|
||
export { NotificatinProvider, useNotificationContext }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export function IllustAlarm() { | ||
return ( | ||
<svg width="170" height="170" viewBox="0 0 170 170" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M71.2695 29.2046L72.6879 41.0839L82.6168 42.8569L83.326 27.6089L76.9432 25.1267L71.2695 29.2046Z" | ||
fill="#5A5C63" | ||
/> | ||
<path | ||
d="M63.7634 128.543L72.5976 117.45L84.7537 113.73L95.5535 126.38L94.251 139.691L75.3398 146.097L65.4554 139.226L63.7634 128.543Z" | ||
fill="#5A5C63" | ||
/> | ||
<path | ||
d="M42.3687 73.7064L45.9148 104.911L39 116.968L41.3049 123.351L79.2475 124.237L117.722 120.514V112.535L109.566 103.493L111.871 73.7064L106.552 54.3805L90.2402 39.8418H65.2406L48.5743 54.3805L42.3687 73.7064Z" | ||
fill="#5A5C63" | ||
/> | ||
<path | ||
d="M100.699 62.7135L93.4297 55.4441L97.8622 64.8411L99.6352 74.9473L105.486 74.4154L100.699 62.7135Z" | ||
fill="#989BA2" | ||
/> | ||
<path | ||
d="M72.8394 116.991H39.0664L41.0928 124.421L77.5677 125.096L118.095 121.043V112.262L95.8051 114.964L72.8394 116.991Z" | ||
fill="#46474C" | ||
/> | ||
<path | ||
d="M105.569 24.9761L119.692 10.6904L124.011 20.3306L113.573 26.7086L118.933 33.974L110.102 40.9215L108.021 38.6438L112.037 32.7859L105.569 24.9761Z" | ||
fill="#25A778" | ||
/> | ||
<path d="M117.168 51.6198L135.247 49.9999L132.646 40.4662L116.087 46.7327L117.168 51.6198Z" fill="#186D50" /> | ||
</svg> | ||
); | ||
} |