-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ability to toggle hide scrollbars for mobile devices
- Loading branch information
1 parent
47f9827
commit 0088af4
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
desktop-app/src/renderer/components/ToolBar/Menu/Flyout/HideScrollbarForMobile/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useState } from 'react'; | ||
import Toggle from 'renderer/components/Toggle'; | ||
|
||
const HideScrollBarForMobile = () => { | ||
const [allowed, setAllowed] = useState<boolean>( | ||
window.electron.store.get('userPreferences.hideScrollbarForMobile') | ||
); | ||
|
||
return ( | ||
<div className="flex flex-row items-center justify-start px-4"> | ||
<span className="w-1/2">Hide Scrollbar for Mobile</span> | ||
<div className="flex items-center gap-2 border-l px-4 dark:border-slate-400"> | ||
<Toggle | ||
isOn={allowed} | ||
onChange={(value) => { | ||
setAllowed(value.target.checked); | ||
window.electron.store.set( | ||
'userPreferences.hideScrollbarForMobile', | ||
value.target.checked | ||
); | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HideScrollBarForMobile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters