refactor: remove reliance on viewport height in favor of body (#1926)

This commit is contained in:
Mo
2022-11-01 15:58:12 -05:00
committed by GitHub
parent d3f04451af
commit 25ecdceea9
17 changed files with 89 additions and 124 deletions

View File

@@ -1,4 +1,5 @@
import { getPlatformString } from '@/Utils'
import { classNames } from '@/Utils/ConcatenateClassNames'
import { DialogOverlay, DialogContent } from '@reach/dialog'
import { ReactNode } from 'react'
@@ -16,7 +17,10 @@ const HistoryModalDialog = ({ children, onDismiss }: Props) => {
>
<DialogContent
aria-label="Note revision history"
className="my-0 flex h-screen w-full flex-col rounded-md bg-[color:var(--modal-background-color)] p-0 pt-safe-top pb-safe-bottom shadow-lg md:max-h-[90%] md:w-[90%] md:max-w-[90%]"
className={classNames(
'my-0 flex h-full w-full flex-col rounded-md bg-[color:var(--modal-background-color)]',
'p-0 pt-safe-top pb-safe-bottom shadow-lg md:max-h-[90%] md:w-[90%] md:max-w-[90%]',
)}
>
<div className="flex h-full flex-col overflow-hidden bg-default">{children}</div>
</DialogContent>