Move settings modal onto shared frame
This commit is contained in:
parent
5e0303d065
commit
fe79085f72
1 changed files with 11 additions and 43 deletions
|
|
@ -2,11 +2,7 @@
|
||||||
|
|
||||||
import { Fragment, useState, useEffect, useCallback, useMemo } from 'react';
|
import { Fragment, useState, useEffect, useCallback, useMemo } from 'react';
|
||||||
import {
|
import {
|
||||||
Dialog,
|
|
||||||
DialogPanel,
|
|
||||||
DialogTitle,
|
|
||||||
Transition,
|
Transition,
|
||||||
TransitionChild,
|
|
||||||
Listbox,
|
Listbox,
|
||||||
ListboxButton,
|
ListboxButton,
|
||||||
ListboxOptions,
|
ListboxOptions,
|
||||||
|
|
@ -56,6 +52,8 @@ import {
|
||||||
Button,
|
Button,
|
||||||
IconButton,
|
IconButton,
|
||||||
Input,
|
Input,
|
||||||
|
ModalFrame,
|
||||||
|
ModalTitle,
|
||||||
inputClass,
|
inputClass,
|
||||||
listboxButtonClass,
|
listboxButtonClass,
|
||||||
listboxOptionClass,
|
listboxOptionClass,
|
||||||
|
|
@ -514,42 +512,17 @@ export function SettingsModal({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Transition appear show={isOpen} as={Fragment}>
|
<ModalFrame
|
||||||
<Dialog
|
open={isOpen}
|
||||||
as="div"
|
onClose={resetToCurrent}
|
||||||
className={`relative ${isChangelogOpen ? 'z-[90]' : 'z-50'}`}
|
size="xl"
|
||||||
onClose={resetToCurrent}
|
panelTestId="settings-modal"
|
||||||
>
|
className={isChangelogOpen ? 'z-[90]' : 'z-50'}
|
||||||
<TransitionChild
|
>
|
||||||
as={Fragment}
|
|
||||||
enter="ease-standard duration-slow"
|
|
||||||
enterFrom="opacity-0"
|
|
||||||
enterTo="opacity-100"
|
|
||||||
leave="ease-standard duration-base"
|
|
||||||
leaveFrom="opacity-100"
|
|
||||||
leaveTo="opacity-0"
|
|
||||||
>
|
|
||||||
<div className="fixed inset-0 overlay-dim backdrop-blur-sm" />
|
|
||||||
</TransitionChild>
|
|
||||||
|
|
||||||
<div className="fixed inset-0 overflow-y-auto">
|
|
||||||
<div className="flex min-h-full items-start justify-center p-4 pt-6 text-center sm:items-center sm:pt-4">
|
|
||||||
<TransitionChild
|
|
||||||
as={Fragment}
|
|
||||||
enter="ease-standard duration-slow"
|
|
||||||
enterFrom="opacity-0 scale-95"
|
|
||||||
enterTo="opacity-100 scale-100"
|
|
||||||
leave="ease-standard duration-base"
|
|
||||||
leaveFrom="opacity-100 scale-100"
|
|
||||||
leaveTo="opacity-0 scale-95"
|
|
||||||
>
|
|
||||||
<DialogPanel data-testid="settings-modal" className="relative w-full max-w-4xl transform rounded-lg bg-surface text-left align-middle shadow-elev-3 transition overflow-hidden border border-line">
|
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between px-5 py-3 border-b border-line-soft">
|
<div className="flex items-center justify-between px-5 py-3 border-b border-line-soft">
|
||||||
<div className="flex items-baseline gap-4">
|
<div className="flex items-baseline gap-4">
|
||||||
<DialogTitle as="h3" className="text-lg font-semibold leading-6 text-foreground">
|
<ModalTitle>Settings</ModalTitle>
|
||||||
Settings
|
|
||||||
</DialogTitle>
|
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|
@ -1298,12 +1271,7 @@ export function SettingsModal({
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</DialogPanel>
|
</ModalFrame>
|
||||||
</TransitionChild>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Dialog>
|
|
||||||
</Transition>
|
|
||||||
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
isOpen={showDeleteDocsConfirm}
|
isOpen={showDeleteDocsConfirm}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue