UI Fixes for Dark Mode (#3337)

* Forced Scroll BG color fix

* pr requested changes
This commit is contained in:
Kanav Arora
2024-01-17 16:24:29 +05:30
committed by GitHub
parent 60e9864e52
commit 5cf0077e3d

View File

@ -1,4 +1,5 @@
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { css, Global, useTheme } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { AnimatePresence, LayoutGroup } from 'framer-motion'; import { AnimatePresence, LayoutGroup } from 'framer-motion';
@ -62,8 +63,16 @@ type DefaultLayoutProps = {
export const DefaultLayout = ({ children }: DefaultLayoutProps) => { export const DefaultLayout = ({ children }: DefaultLayoutProps) => {
const onboardingStatus = useOnboardingStatus(); const onboardingStatus = useOnboardingStatus();
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const theme = useTheme();
return ( return (
<>
<Global
styles={css`
body {
background: ${theme.background.tertiary};
}
`}
/>
<StyledLayout> <StyledLayout>
<CommandMenu /> <CommandMenu />
<KeyboardShortcutMenu /> <KeyboardShortcutMenu />
@ -87,5 +96,6 @@ export const DefaultLayout = ({ children }: DefaultLayoutProps) => {
</StyledPageContainer> </StyledPageContainer>
{isMobile && <MobileNavigationBar />} {isMobile && <MobileNavigationBar />}
</StyledLayout> </StyledLayout>
</>
); );
}; };