Legacy
CoreSectionMessage
섹션 메시지 컴포넌트
Usage
기본 사용법
import { CoreSectionMessage } from '@featuring-corp/components';
<CoreSectionMessage
status="success"
title="타이틀 영역 입니다"
/>Description 포함
import { CoreSectionMessage } from '@featuring-corp/components';
<CoreSectionMessage
status="error"
title="타이틀 영역 입니다"
description="서브 타이틀 영역입니다."
/>삭제 버튼 포함
import { CoreSectionMessage } from '@featuring-corp/components';
<CoreSectionMessage
status="error"
title="타이틀 영역 입니다"
description="서브 타이틀 영역입니다."
onDelete={() => {
console.log('Delete');
}}
/>액션 버튼 포함
import { CoreSectionMessage } from '@featuring-corp/components';
import { IconSearch } from '@featuring-corp/icons';
<CoreSectionMessage
status="success"
title="타이틀 영역 입니다"
actionButtonProps={{
text: 'Action',
prefix: <IconSearch />,
onClick: () => {
console.log('action');
},
}}
/>모든 기능 조합
import { CoreSectionMessage } from '@featuring-corp/components';
import { IconSearch } from '@featuring-corp/icons';
<CoreSectionMessage
status="error"
title="타이틀 영역 입니다"
description="서브 타이틀 영역입니다."
actionButtonProps={{
text: 'Action',
prefix: <IconSearch />,
onClick: () => {
console.log('action');
},
}}
onDelete={() => {
console.log('Delete');
}}
/>다양한 상태
import { CoreSectionMessage } from '@featuring-corp/components';
// Error
<CoreSectionMessage
status="error"
title="에러 메시지"
description="에러가 발생했습니다."
/>
// Info
<CoreSectionMessage
status="info"
title="정보 메시지"
description="참고할 정보입니다."
/>
// Success
<CoreSectionMessage
status="success"
title="성공 메시지"
description="작업이 완료되었습니다."
/>
// Warning
<CoreSectionMessage
status="warning"
title="경고 메시지"
description="주의가 필요합니다."
/>ReactElement로 액션 버튼 전달
import { CoreSectionMessage, CoreButton } from '@featuring-corp/components';
<CoreSectionMessage
status="success"
title="타이틀 영역 입니다"
actionButtonProps={
<CoreButton
text="커스텀 버튼"
onClick={() => console.log('clicked')}
/>
}
/>Props
ComponentPropsWithoutRef<'div'> 타입을 확장한 컴포넌트입니다.
Prop
Type
CoreSectionMessageStatus
Prop
Type
스타일
기본 스타일 속성
Section Base:
display:flexjustify-content:space-betweenalign-items:stretchgap:spacing-200(8px)padding-x:spacing-300(12px)padding-y:spacing-200(8px)border-radius:radius-100border-width:1pxborder-style:solidwidth:100%(기본값)
Left Area:
display:flexjustify-content:flex-startalign-items:flex-startgap:spacing-200(8px)
Right Area:
flex-shrink:0
Title:
typography:body[2]
Description:
typography:body[1]white-space:pre-wrap
Text Wrapper:
display:gridflex:1gap:spacing-100(4px)
Status Icon:
width:16pxheight:24px
Icon Wrapper:
width:16pxheight:16pxalign-self:flex-start
Button:
display:flextypography:heading[1]margin-x:spacing-250(10px)height:24px
Status Variants (상태별 토큰)
각 status에 따라 다음 색상이 적용됩니다:
Error
background-color:support-error[1]border-color:support-error[2]color:support-error[4]
Info
background-color:support-info[1]border-color:support-info[2]color:support-info[4]
Success
background-color:support-success[1]border-color:support-success[2]color:support-success[4]
Warning
background-color:support-warning[1]border-color:support-warning[2]color:support-warning[4]