MSP-3074 add antd theme

This commit is contained in:
Anastasiia committed 2024-03-26 14:59:35 +03:00
1 parent 9f7fa17af1
commit 5f73d33a58
6 files changed
+984 -49

No files matched your search

+16 -1
View File
@@ -2,16 +2,31 @@ import { Route, Routes } from 'react-router-dom';
import HomePages from '../pages/HomePage/HomePages.tsx';
import './app.scss'
function App() {
import { useState } from 'react';
import { Segmented } from 'antd';
import { ThemeAppearance, ThemeProvider } from 'antd-style';
const options = [
{ label: 'Light', value: 'light' },
{ label: 'Dark', value: 'dark' },
];
function App() {
const [appearance, setTheme] = useState<ThemeAppearance>('light');
return (
<div className="app">
<Segmented onChange={(v) => setTheme(v as ThemeAppearance)} options={options} />
<ThemeProvider appearance={appearance} >
<Routes>
<Route path="/" element={<HomePages/>}/>
</Routes>
</ThemeProvider>
</div>
)
}
export default App