瀏覽代碼

update dialogBox

Abhinav 3 年之前
父節點
當前提交
b3e77efec1
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 2 1
      src/components/DialogBox/index.tsx
  2. 0 1
      src/types/dialogBox/index.ts

+ 2 - 1
src/components/DialogBox/index.tsx

@@ -18,6 +18,7 @@ type IProps = React.PropsWithChildren<
         onClose: () => void;
         attributes: DialogBoxAttributes;
         size?: Breakpoint;
+        titleCloseButton?: boolean;
     }
 >;
 
@@ -46,7 +47,7 @@ export default function DialogBox({ attributes, children, ...props }: IProps) {
                 <DialogTitleWithCloseButton
                     onClose={
                         !attributes?.nonClosable &&
-                        attributes?.close?.titleCloseButton &&
+                        props.titleCloseButton &&
                         handleClose
                     }>
                     {attributes.title}

+ 0 - 1
src/types/dialogBox/index.ts

@@ -9,7 +9,6 @@ export interface DialogBoxAttributes {
         text?: string;
         variant?: ButtonProps['color'];
         action?: () => void;
-        titleCloseButton?: boolean;
     };
     proceed?: {
         text: string;