saq1b's picture
initialize project with Vite, React, and essential configurations
eceb7aa
import React from 'react';
import ReactDOM from 'react-dom/client';
import { ChakraProvider, extendTheme } from '@chakra-ui/react';
import App from './App';
// Theme configuration for dark mode
const theme = extendTheme({
config: {
initialColorMode: 'dark',
useSystemColorMode: false,
},
styles: {
global: {
body: {
bg: '#000',
color: '#fff',
}
}
},
colors: {
brand: {
100: '#f7fafc',
900: '#1a202c',
},
gray: {
50: '#f7fafc',
100: '#edf2f7',
700: '#2d3748',
800: '#1a202c',
900: '#0f1116',
}
},
components: {
Button: {
baseStyle: {
borderRadius: 'md',
},
variants: {
solid: {
bg: 'gray.700',
color: 'white',
_hover: {
bg: 'gray.800',
}
}
}
},
Input: {
variants: {
filled: {
field: {
bg: 'gray.800',
_hover: {
bg: 'gray.700',
},
_focus: {
bg: 'gray.700',
}
}
}
},
defaultProps: {
variant: 'filled',
}
}
}
});
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<ChakraProvider theme={theme}>
<App />
</ChakraProvider>
</React.StrictMode>
);