depromeet / ahmatda-web

아맞다 :white_check_mark: 이젠 까먹지 말고 챙기자
https://github.com/depromeet/ahmatda-web#download
7 stars 0 forks source link

토스트 메세지 관련 개발 #154

Closed hyesungoh closed 1 year ago

hyesungoh commented 1 year ago

🤔 해결하려는 문제가 무엇인가요?

🎉 어떻게 해결했나요?

- 한 번에 한 개의 토스트 메세지만 그릴 수 있음
- 같은 내용의 토스트가 fire 될 시 duration을 초기화
- 다른 내용의 토스트가 fire 될 시 기존 토스트가 내려감

사용 방법

const { fireToast } = useToast();

// 기본 duration 1500ms
<button onClick={() => fireToast({content: '토스트 내용'})}>fire toast</button>

<button onClick={() => fireToast({content: '토스트 내용', duration: 3000})}>fire toast</button>

📚 Attachment (Option)

https://user-images.githubusercontent.com/26461307/206860514-f9a87fd0-4b71-4652-a22e-58209c161f88.mov

codecov-commenter commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (2060abd) compared to base (068de89). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #154 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 21 21 Lines 191 191 Branches 37 37 ========================================= Hits 191 191 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=depromeet). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=depromeet)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

github-actions[bot] commented 1 year ago

Bundle Sizes

Compared against c72d5fe34d60ef2acd2da036299caef83f53deba

Route Size (gzipped) Diff
/ 87.08 KB -4.87 KB
/_app 185.56 KB +4.26 KB
/onboard/step1 74.19 KB -2.99 KB
/onboard/step2 74.43 KB -2.99 KB
/onboard/step3 76.19 KB -2.98 KB
/template 82.1 KB -4.84 KB
/test 106.05 KB -4.78 KB

Dynamic import: No significant changes found

cloudflare-workers-and-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ddf2cc
Status: ✅  Deploy successful!
Preview URL: https://1b88315e.12-team3-web.pages.dev
Branch Preview URL: https://issue-153.12-team3-web.pages.dev

View logs