sellmate-design-system-react 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ export interface SActionModalButton {
6
6
  outline?: boolean;
7
7
  size?: SButtonSize;
8
8
  disabled?: boolean;
9
+ /** 클릭 핸들러. 모달은 자동으로 닫히지 않으므로 닫는 시점은 onOpenChange 로 직접 제어한다 */
9
10
  onClick?: () => void;
10
11
  }
11
12
  export interface SActionModalProps {
@@ -22,5 +23,10 @@ export interface SActionModalProps {
22
23
  height?: number | string;
23
24
  children?: ReactNode;
24
25
  }
25
- /** SActionModal — sd-action-modal 포팅. 헤더(제목·닫기) + 본문 + 하단 액션 버튼. */
26
+ /**
27
+ * SActionModal — sd-action-modal 포팅. 헤더(제목·닫기) + 본문 + 하단 액션 버튼.
28
+ *
29
+ * 액션 버튼은 `button.onClick` 만 호출하고 모달을 닫지 않는다. 본문에서 API 를 호출하는 경우가
30
+ * 많아 성공 여부에 따라 닫힘 시점이 달라지므로, 닫는 책임은 사용하는 쪽에 둔다.
31
+ */
26
32
  export declare function SActionModal({ open, onOpenChange, onClose, persistent, modalTitle, button, width, height, children, }: SActionModalProps): import("react").JSX.Element;
@@ -3356,10 +3356,7 @@ function SActionModal({
3356
3356
  outline: button.outline,
3357
3357
  size: button.size ?? "md",
3358
3358
  disabled: button.disabled,
3359
- onClick: () => {
3360
- button.onClick?.();
3361
- onOpenChange?.(false);
3362
- },
3359
+ onClick: () => button.onClick?.(),
3363
3360
  label: button.label ?? "\uD655\uC778"
3364
3361
  }
3365
3362
  )