Skip to content

Commit

Permalink
chore(web): remove chakra packages
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Jan 2, 2023
1 parent d48b5e1 commit 9f1ae61
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 1,427 deletions.
2 changes: 0 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1,424 changes: 56 additions & 1,368 deletions web/pnpm-lock.yaml

Large diffs are not rendered by default.

23 changes: 0 additions & 23 deletions web/src/features/dialog/components/InfoTooltip.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions web/src/features/dialog/components/Label.tsx

This file was deleted.

2 changes: 2 additions & 0 deletions web/src/features/progress/CircleProgressbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
},
}));

Expand Down
3 changes: 2 additions & 1 deletion web/src/features/progress/Progressbar.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -45,6 +45,7 @@ const useStyles = createStyles((theme) => ({
overflow: 'hidden',
whiteSpace: 'nowrap',
fontSize: 20,
color: theme.colors.gray[3],
textShadow: theme.shadows.sm,
},
}));
Expand Down
4 changes: 4 additions & 0 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ body {
overflow: hidden !important;
}

p {
margin: 0;
}

#root {
height: 100%;
}
Expand Down
15 changes: 2 additions & 13 deletions web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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>
Expand Down
12 changes: 5 additions & 7 deletions web/src/theme/index.ts
Original file line number Diff line number Diff line change
@@ -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,
});

0 comments on commit 9f1ae61

Please sign in to comment.