MSP-3074 add roles
This commit is contained in:
1 parent
5a29bfc7f6
commit
9c1b859971
36 files changed
+1063
-100
No files matched your search
@@ -1,23 +0,0 @@
|
||||
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;
|
||||
@@ -0,0 +1,6 @@
|
||||
.header {
|
||||
width: 100%;
|
||||
border: none;
|
||||
display: flex;
|
||||
justify-content: end
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import {useContext} from "react";
|
||||
import {ThemeAppearance, useTheme} from "antd-style";
|
||||
import {Segmented} from "antd";
|
||||
import {Context} from "../../store";
|
||||
import './header.scss'
|
||||
|
||||
|
||||
const options = [
|
||||
{label: 'Light', value: 'light'},
|
||||
{label: 'Dark', value: 'dark'},
|
||||
];
|
||||
|
||||
function Header() {
|
||||
const theme = useTheme();
|
||||
const {setTheme} = useContext(Context)
|
||||
|
||||
return <header className='header' style={{
|
||||
background: theme.colorBgLayout
|
||||
}}><Segmented onChange={(v) => setTheme(v as ThemeAppearance)} options={options}/></header>;
|
||||
}
|
||||
|
||||
export default Header;
|
||||
Reference in new issue
Block a user