결과 페이지
결과 페이지 (ResultPage)
결과 페이지(ResultPage)는 이전 작업의 결과를 화면 전체에 피드백으로 보여줘요. 중요한 작업 결과를 상세하게 알릴 때 사용해요.
출처: 문서
본문
언제 사용하나요
매우 중요한 작업이 있어서 처리 결과를 사용자에게 알려야 하고, 피드백 내용이 복잡할 때 사용해요.
데모
기본 사용
상세 데이터 표시
세 줄을 넘으면 자동으로 접혀요.
Card와 함께 사용
ResultPage.Card나 Card와 함께 사용해요.
하단 버튼
커스텀 사용
ResultPage
Props
interface ResultPageDetail {
label: ReactNode;
value: ReactNode;
bold: boolean; // When the `bold` field is `true`, the text will be bolded.
}
type ResultPageDetails = ResultPageDetail[]
| Name | Description | Type | Default |
|---|---|---|---|
| children | 페이지 콘텐츠, Card 컴포넌트만 전달하는 것을 권장해요. 구체적인 사용은 여기 참고 | Card | - |
| description | 설명 | ReactNode |
- |
| details | 상세 정보, 세 줄을 넘으면 자동으로 접힘 | ResultPageDetail[] |
- |
| icon | 커스텀 icon |
ReactNode |
- |
| onPrimaryButtonClick | 기본(primary) 버튼이 클릭된 후의 이벤트 | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void> |
- |
| onSecondaryButtonClick | 보조(secondary) 버튼이 클릭된 후의 이벤트 | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void |Promise<void> |
- |
| primaryButtonText | 기본 버튼의 텍스트, undefined, null 또는 빈 문자열이면 버튼이 표시되지 않아요 |
ReactNode |
- |
| secondaryButtonText | 보조 버튼의 텍스트, undefined, null 또는 빈 문자열이면 버튼이 표시되지 않아요 |
ReactNode |
- |
| status | 상태 유형 | 'success' | 'error' | 'info' | 'waiting' | 'warning' |
'info' |
| title | 제목 | ReactNode |
- |
CSS Variables
| Name | Description | Default |
|---|---|---|
| --head-background-color | 헤드 영역의 배경색 | var(--adm-color-primary) |
ResultPage.Card
패딩 없는 흰색 카드를 제공하고, 스타일은 직접 제어할 수 있어요.
| Name | Description | Type | Default |
|---|---|---|---|
| children | 카드의 콘텐츠 | ReactNode | - |
더 알아보기
작은 영역으로 결과를 알려주는 UI는 Result 계열 문서를 참고하세요. ResultPage 안에 넣어 쓰는 카드 컴포넌트는 Card 문서를 확인하세요.