File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default function Language() {
7
7
const { i18n } = useTranslation ( ) ;
8
8
9
9
return (
10
- < div className = "grid grid-cols-3 gap-4" >
10
+ < div className = "grid grid-cols-4 md:grid-cols-2 gap-4" >
11
11
{ languages . map ( ( l ) => (
12
12
< button
13
13
key = { l . code }
Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ import {
21
21
} from "../../../hooks" ;
22
22
import { saveAs } from "file-saver" ;
23
23
import { Parser } from "node-sql-parser" ;
24
- import { getModalTitle , getOkText } from "../../../utils/modalTitles" ;
24
+ import {
25
+ getModalTitle ,
26
+ getModalWidth ,
27
+ getOkText ,
28
+ } from "../../../utils/modalData" ;
25
29
import Rename from "./Rename" ;
26
30
import Open from "./Open" ;
27
31
import New from "./New" ;
@@ -363,7 +367,7 @@ export default function Modal({
363
367
( modal === MODAL . IMPORT_SRC && importSource . src === "" ) ,
364
368
} }
365
369
cancelText = { t ( "cancel" ) }
366
- width = { modal === MODAL . NEW || modal === MODAL . OPEN ? 740 : 600 }
370
+ width = { getModalWidth ( modal ) }
367
371
bodyStyle = { {
368
372
maxHeight : window . innerHeight - 280 ,
369
373
overflow : "auto" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,17 @@ export const getModalTitle = (modal) => {
28
28
}
29
29
} ;
30
30
31
+ export const getModalWidth = ( modal ) => {
32
+ switch ( modal ) {
33
+ case MODAL . LANGUAGE :
34
+ case MODAL . OPEN :
35
+ case MODAL . NEW :
36
+ return 740 ;
37
+ default :
38
+ return 600 ;
39
+ }
40
+ } ;
41
+
31
42
export const getOkText = ( modal ) => {
32
43
switch ( modal ) {
33
44
case MODAL . IMPORT :
You can’t perform that action at this time.
0 commit comments