chore(web): remove chakra packages

This commit is contained in:
Luke
2023-01-02 14:02:07 +01:00
parent d48b5e199b
commit 9f1ae6184a
9 changed files with 16 additions and 1372 deletions

View File

@@ -4,9 +4,7 @@
"homepage": "web/build",
"private": true,
"dependencies": {
"@chakra-ui/react": "2.3.6",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.8.1",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",

1314
web/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +0,0 @@
import { Box, Tooltip } from '@chakra-ui/react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const InfoTooltip: React.FC<{ description: string }> = ({ description }) => {
return (
<Tooltip label={description} placement="top" hasArrow arrowSize={4} maxW={220}>
<Box
borderRadius="full"
bg="whiteAlpha.200"
p={0.5}
w={18}
h={18}
display="flex"
alignItems="center"
justifyContent="center"
>
<FontAwesomeIcon icon="question" fixedWidth fontSize={10} />
</Box>
</Tooltip>
);
};
export default InfoTooltip;

View File

@@ -1,13 +0,0 @@
import { HStack, Text } from '@chakra-ui/react';
import InfoTooltip from './InfoTooltip';
const Label: React.FC<{ label: string; description?: string }> = ({ label, description }) => {
return (
<HStack spacing={1}>
<Text>{label}</Text>
{description && <InfoTooltip description={description} />}
</HStack>
);
};
export default Label;

View File

@@ -42,10 +42,12 @@ const useStyles = createStyles((theme, params: { position: 'middle' | 'bottom';
textAlign: 'center',
fontFamily: 'roboto-mono',
textShadow: theme.shadows.sm,
color: theme.colors.gray[3],
},
label: {
textAlign: 'center',
textShadow: theme.shadows.sm,
color: theme.colors.gray[3],
},
}));

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Progress, Box, Text, createStyles } from '@mantine/core';
import { Box, Text, createStyles } from '@mantine/core';
import { useNuiEvent } from '../../hooks/useNuiEvent';
import { fetchNui } from '../../utils/fetchNui';
import ScaleFade from '../../transitions/ScaleFade';
@@ -45,6 +45,7 @@ const useStyles = createStyles((theme) => ({
overflow: 'hidden',
whiteSpace: 'nowrap',
fontSize: 20,
color: theme.colors.gray[3],
textShadow: theme.shadows.sm,
},
}));

View File

@@ -22,6 +22,10 @@ body {
overflow: hidden !important;
}
p {
margin: 0;
}
#root {
height: 100%;
}

View File

@@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { ChakraProvider } from '@chakra-ui/react';
import { theme } from './theme';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
@@ -28,18 +27,8 @@ const root = document.getElementById('root');
ReactDOM.createRoot(root!).render(
<React.StrictMode>
<LocaleProvider>
<MantineProvider
withNormalizeCSS
withGlobalStyles
theme={{
colorScheme: 'dark',
fontFamily: 'Roboto',
shadows: { sm: '1px 1px 3px rgba(0, 0, 0, 0.5)' },
}}
>
<ChakraProvider theme={theme}>
<App />
</ChakraProvider>
<MantineProvider withNormalizeCSS withGlobalStyles theme={theme}>
<App />
</MantineProvider>
</LocaleProvider>
</React.StrictMode>

View File

@@ -1,9 +1,7 @@
import { extendTheme, type ThemeConfig } from '@chakra-ui/react';
import { MantineThemeOverride } from '@mantine/core';
const config: ThemeConfig = {
initialColorMode: 'dark',
export const theme: MantineThemeOverride = {
colorScheme: 'dark',
fontFamily: 'Roboto',
shadows: { sm: '1px 1px 3px rgba(0, 0, 0, 0.5)' },
};
export const theme = extendTheme({
config,
});