Notification
Notification (알림 통지)
Notification은 전역으로 알림 메시지를 표시하는 피드백(Feedback) 컴포넌트예요.
출처: 문서
본문
API
Notification
| 속성 | 설명 | 타입 | 기본값 | 버전 |
|---|---|---|---|---|
| closable | 닫기 버튼을 표시할지 여부 | boolean | true |
- |
| showIcon | 아이콘을 표시할지 여부 | boolean | true |
- |
| duration | 자동으로 닫히는 시간이에요. 단위는 ms예요 |
number | 3000 |
- |
| id | 현재 알림의 고유 식별자예요. 메시지를 업데이트할 때 쓸 수 있어요 | string | - |
- |
| position | 메시지의 위치 | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | - |
- |
| btn | 액션 버튼을 추가해요 | ReactNode | - |
- |
| closeIcon | 오른쪽 위 닫기 버튼을 커스터마이즈해요 | ReactNode | - |
2.50.0 |
| icon | 아이콘을 커스터마이즈해요 | ReactNode | - |
- |
| className | 추가 css 클래스 | string | string[] | - |
- |
| content | 알림 내용 | ReactNode | string (필수) | - |
- |
| style | 추가 스타일 | CSSProperties | - |
- |
| title | 알림 제목 | ReactNode | string | - |
- |
| onClose | 닫을 때 호출되는 콜백 | () => void | - |
- |
메서드 (Methods)
Notification.info(config)Notification.success(config)Notification.warning(config)Notification.error(config)Notification.normal(config)Notification.remove(id)Notification.clear()
전역 설정 (Global config)
Notification.config(options)
| 속성 | 설명 | 타입 | 기본값 |
|---|---|---|---|
| maxCount | 최대 알림 개수 | number |
- |
| getContainer | 알림의 컨테이너 | () => HTMLElement |
() => document.body |
| duration | 알림이 자동으로 닫히는 시간 | number |
3000 |
| prefixCls | 클래스명 접두사 | string |
arco |
더 알아보기 (Learn more)
Notification 컴포넌트의 더 자세한 내용은 Arco Design 공식 문서에서 확인할 수 있어요.