feishin/src/remote/app.tsx

74 lines
2.3 KiB
TypeScript
Raw Normal View History

import { MantineProvider } from '@mantine/core';
2025-05-20 19:23:36 -07:00
import { useEffect } from 'react';
import './styles/global.css';
2025-05-20 19:23:36 -07:00
import { Shell } from '/@/remote/components/shell';
2025-05-20 19:23:36 -07:00
import { useIsDark, useReconnect } from '/@/remote/store';
export const App = () => {
const isDark = useIsDark();
const reconnect = useReconnect();
useEffect(() => {
reconnect();
}, [reconnect]);
return (
<MantineProvider
defaultColorScheme={isDark ? 'dark' : 'light'}
theme={{
components: {
AppShell: {
styles: {
body: {
height: '100vh',
overflow: 'scroll',
},
},
},
Modal: {
styles: {
body: {
background: 'var(--theme-modal-bg)',
height: '100vh',
},
close: { marginRight: '0.5rem' },
content: { borderRadius: '5px' },
header: {
background: 'var(--theme-modal-header-bg)',
paddingBottom: '1rem',
},
title: { fontSize: 'medium', fontWeight: 500 },
},
},
},
defaultRadius: 'xs',
focusRing: 'auto',
fontFamily: 'var(--theme-content-font-family)',
fontSizes: {
lg: '1.1rem',
md: '1rem',
sm: '0.9rem',
xl: '1.5rem',
xs: '0.8rem',
},
headings: {
fontFamily: 'var(--theme-content-font-family)',
fontWeight: '700',
},
other: {},
spacing: {
lg: '2rem',
md: '1rem',
sm: '0.5rem',
xl: '4rem',
xs: '0rem',
},
}}
>
<Shell />
</MantineProvider>
);
};