From e4ccca3e28f2df52646385ef3957e79f4d203f94 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Fri, 29 Apr 2022 19:55:49 +0800 Subject: [PATCH] fix: grid view broken when switch dark mode --- src/component/FileManager/Explorer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/component/FileManager/Explorer.js b/src/component/FileManager/Explorer.js index eb10b20..d46dbad 100644 --- a/src/component/FileManager/Explorer.js +++ b/src/component/FileManager/Explorer.js @@ -86,15 +86,17 @@ const useStyles = makeStyles((theme) => ({ }, gridContainer: { [theme.breakpoints.down("sm")]: { - gridTemplateColumns: "repeat(auto-fill,minmax(180px,1fr))", + gridTemplateColumns: + "repeat(auto-fill,minmax(180px,1fr))!important", }, [theme.breakpoints.up("md")]: { - gridTemplateColumns: "repeat(auto-fill,minmax(220px,1fr))", + gridTemplateColumns: + "repeat(auto-fill,minmax(220px,1fr))!important", }, - display: "grid", + display: "grid!important", }, gridItem: { - flex: "1 1 220px", + flex: "1 1 220px!important", }, })); @@ -392,7 +394,7 @@ export default function Explorer({ share }) { )} ), - [dirList, fileList] + [dirList, fileList, classes] ); const view = viewMethod === "list" ? listView : normalView;