MSP-3074 add layout

This commit is contained in:
Anastasiia committed 2024-03-26 17:30:57 +03:00
1 parent 5f73d33a58
commit 92fcb4a352
7 files changed
+86 -34

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import {useContext} from "react";
import {ThemeAppearance, useTheme} from "antd-style";
import {Segmented} from "antd";
import {Context} from "../../store";
const options = [
{ label: 'Light', value: 'light' },
{ label: 'Dark', value: 'dark' },
];
function Header() {
const theme = useTheme();
const { setTheme } = useContext(Context)
return <header style={{
background: theme.colorBgLayout,
width: '100%',
border: 'none',
display: 'flex',
justifyContent: 'end'
}}><Segmented onChange={(v) => setTheme(v as ThemeAppearance)} options={options} /></header>;
}
export default Header;