fix: padding on files view on mobile (#1934)

This commit is contained in:
Aman Harwara
2022-11-04 01:34:47 +05:30
committed by GitHub
parent 5075b0c85a
commit 633d6189fb
2 changed files with 4 additions and 4 deletions

View File

@@ -72,11 +72,11 @@ const ResponsivePaneProvider = ({ paneController, children }: ProviderProps) =>
useEffect(() => { useEffect(() => {
if (previousSelectedPane) { if (previousSelectedPane) {
const previousPaneElement = document.getElementById(ElementIds[previousSelectedPane]) const previousPaneElement = document.getElementById(ElementIds[previousSelectedPane])
previousPaneElement?.classList.remove('selected') previousPaneElement?.removeAttribute('data-selected-pane')
} }
const currentPaneElement = document.getElementById(ElementIds[currentSelectedPane]) const currentPaneElement = document.getElementById(ElementIds[currentSelectedPane])
currentPaneElement?.classList.add('selected') currentPaneElement?.setAttribute('data-selected-pane', '')
}, [currentSelectedPane, previousSelectedPane]) }, [currentSelectedPane, previousSelectedPane])
const addAndroidBackHandler = useAndroidBackHandler() const addAndroidBackHandler = useAndroidBackHandler()

View File

@@ -17,7 +17,7 @@
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
&.selected { &[data-selected-pane] {
flex-grow: 1; flex-grow: 1;
.content { .content {
@@ -30,7 +30,7 @@
left: 0 !important; left: 0 !important;
} }
&:not(.selected) { &:not([data-selected-pane]) {
min-height: 0; min-height: 0;
height: auto; height: auto;
padding: 0; padding: 0;