mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #36539 from overleaf/mj-misc-dark-mode-modals-core1
[web] Add dark mode to misc editor modals GitOrigin-RevId: 3d7bd45476b0f814abfc26fa3da3eecca54342e8
This commit is contained in:
committed by
Copybot
parent
034b9e35be
commit
51ae580da9
@@ -24,6 +24,7 @@ import { mathPreviewStateField } from '../extensions/math-preview'
|
||||
import { getTooltip } from '@codemirror/view'
|
||||
import ReactDOM from 'react-dom'
|
||||
import DropdownMenuItem from '@/shared/components/dropdown/dropdown-menu-item'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
|
||||
const MathPreviewTooltipContainer: FC = () => {
|
||||
const state = useCodeMirrorStateContext()
|
||||
@@ -59,6 +60,8 @@ const MathPreviewTooltipContainer: FC = () => {
|
||||
const MathPreviewTooltipMenu: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const themed = useFeatureFlag('themed-modals')
|
||||
|
||||
const [showDisableModal, setShowDisableModal] = useState(false)
|
||||
const { setMathPreview } = useProjectSettingsContext()
|
||||
const openDisableModal = useCallback(() => setShowDisableModal(true), [])
|
||||
@@ -115,7 +118,7 @@ const MathPreviewTooltipMenu: FC = () => {
|
||||
</OLDropdown>
|
||||
|
||||
{showDisableModal && (
|
||||
<OLModal show onHide={closeDisableModal}>
|
||||
<OLModal show onHide={closeDisableModal} themed={themed}>
|
||||
<OLModalHeader>
|
||||
<OLModalTitle>{t('disable_equation_preview')}</OLModalTitle>
|
||||
</OLModalHeader>
|
||||
|
||||
Reference in New Issue
Block a user