소스 검색

chore: 调整弹出modal宽高

xyh 2 년 전
부모
커밋
1dafbebd60

+ 3 - 1
packages/app/src/components/modal/Modal.tsx

@@ -18,6 +18,7 @@ type Props = {
   children?: ReactNode,
   testId?: string,
   height?: string,
+  width?: string,
 };
 
 const Modal: FC<Props> = function({
@@ -29,10 +30,11 @@ const Modal: FC<Props> = function({
   children,
   testId,
   height,
+  width,
 }) {
   const styles: ReactModalStyle = {
     content: {
-      width: '680px',
+      width: width ?? '680px',
       overflow: 'visible',
       borderRadius: '10px',
       height: height ?? '560px',

+ 2 - 0
packages/app/src/pages/matter/table/modal/index.tsx

@@ -27,6 +27,8 @@ const PutModal: FC<Props> = function({visible, onClose, id, onFetch}) {
       testId='matter_modal'
       onSubmit={onSubmit}
       isLoading={isLoading}
+      height='420px'
+      width='600px'
     >
       <FormProvider {...formInstance}>
         <ErrorBoundary>

+ 1 - 0
packages/app/src/pages/role/table/modal/index.tsx

@@ -22,6 +22,7 @@ const RoleModal: FC<Props> = function({visible, onClose, onFetch, id}) {
       isLoading={isLoading}
       onSubmit={onSubmit}
       testId='role_modal'
+      height='500px'
     >
       <FormProvider {...formInstance}>
         <ErrorBoundary>

+ 2 - 0
packages/app/src/pages/semi-draw/table/modal/index.tsx

@@ -22,6 +22,8 @@ const PutModal: FC<Props> = function({visible, id, onClose, onFetch}) {
       onSubmit={onSubmit}
       testId='semi_draw_modal'
       isLoading={isLoading}
+      height='400px'
+      width='560px'
     >
       <FormProvider {...formInstance}>
         <ErrorBoundary>

+ 2 - 0
packages/app/src/pages/semi-report/table/modal/index.tsx

@@ -25,6 +25,8 @@ const PutModal: FC<Props> = function({visible, onClose, onFetch, id}) {
       onSubmit={onSubmit}
       testId='semi_report_modal'
       isLoading={isLoading}
+      height='400px'
+      width='560px'
     >
       <FormProvider {...formInstance}>
         <ErrorBoundary>