-
Notifications
You must be signed in to change notification settings - Fork 4
[feat] Toast 컴포넌트 구현 #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
91914cb
feat: Toast 컴폰넌트 구현
ghdtnals 504aea1
feat: Toast 훅 추가
ghdtnals 2f68450
chore: 사용하지 않는 파일 삭제
ghdtnals f141276
refactor: Toast 관련 컴포넌트 코드 개선
ghdtnals e48acab
Merge branch 'dev' of https://github.com/CodeitPart3/thejulge into CO…
ghdtnals File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
This file contains hidden or 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,19 @@ | ||
| import { cn } from "@/utils/cn"; | ||
|
|
||
| interface ToastProps { | ||
| label: string; | ||
| className?: string; | ||
| } | ||
|
|
||
| export default function Toast({ label, className }: ToastProps) { | ||
| return ( | ||
| <div | ||
| className={cn( | ||
| "inline-block rounded-md bg-red-30 px-4 py-[10px] text-white body1-regular", | ||
| className, | ||
| )} | ||
| > | ||
| {label} | ||
| </div> | ||
| ); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toast라고 하는 UI가 할 수 있어야 할 동작들이 있을 것 같아요! 🤔사용자가 어떤 행동(ex: 버튼 클릭 등)을 했을 때,
해당 행동이 정상적으로 잘 이뤄졌는지 피드백을 하기 위해서
브라우저 어딘가에 작은 창으로 메시지를 안내하는 것처럼요!
그래서 UI뿐만 아니라 전역적으로 해당 메시지를 바로 나타나게 할 수 있는 훅 등도 같이 구현되면 좋을 것 같아요 😅
UI는 다르지만, 참고할 만한 링크도 같이 첨부해봅니다.
참고1
참고2
혹시 어려우신 부분이 있으시다면, 알려주시면 같이 구현해봐도 좋을 것 같습니다! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 넵 링크 참고해서 코드 다시 수정해보도록 하겠습니다!👍👍