Skip to content

Conversation

@hhhyyo
Copy link
Contributor

@hhhyyo hhhyyo commented Mar 29, 2022

PR Type

What kind of change does this PR introduce?

  • 새로운 기능을 추가했어요.

Related Issues

#16

What does this PR do?

  • Toast 컴포넌트 생성
  • BadgeList 컴포넌트 타입, 스타일 지정
  • 유틸함수 추가
  • 레이아웃 수정

Other information

@hhhyyo hhhyyo added ✨ style UI를 스타일링 해요! (CSS 작업) 🧱 component 컴포넌트 단위 작업을 진행해요! labels Mar 29, 2022
@hhhyyo hhhyyo added this to the Sprint3 milestone Mar 29, 2022
@hhhyyo hhhyyo self-assigned this Mar 29, 2022
@hhhyyo hhhyyo changed the title Develop Toast, BadgeList 컴포넌트 추가 Mar 29, 2022
import { StyledP } from './Toast.styled';
import { ToastProps } from './Toast.types';

export const Toast = ({ message }: ToastProps) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 갖다 쓸 수 있는 토스트 컴포넌트를 만들어주셔서 감사합니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

효원님 제가 Toast 쓰는 useToast 훅 만들었는데 detail페이지에서 가져다 쓰셔도 좋을 것 같아요.
곧 푸시할게요
useToast에 duration을 ms 단위로 전달하면 showToast라는 boolean 상태랑 displayToast라는 함수를 객체로 반환하는데
{ showToast && } 로 렌더링 리턴하고 이벤트 발생 시 displayToast를 호출만 하면 됩니당

@hanana1253 hanana1253 merged commit 6ce6a91 into TeamCooks:develop Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 component 컴포넌트 단위 작업을 진행해요! ✨ style UI를 스타일링 해요! (CSS 작업)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants