othr
This commit is contained in:
14
src/components/Header/Header.module.css
Normal file
14
src/components/Header/Header.module.css
Normal file
@@ -0,0 +1,14 @@
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.header-input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.header-button {
|
||||
height: 100%;
|
||||
width: 10%;
|
||||
min-width: 5rem;
|
||||
}
|
||||
25
src/components/Header/Header.tsx
Normal file
25
src/components/Header/Header.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import styles from './Header.module.css';
|
||||
import {Button, TextInput} from "@mantine/core";
|
||||
import {FC} from "react";
|
||||
|
||||
const Header: FC = ()=>{
|
||||
|
||||
return (
|
||||
<div className={styles['header']}>
|
||||
<TextInput
|
||||
radius={0}
|
||||
placeholder={"Поиск и фильтры"}
|
||||
size={"xl"}
|
||||
className={styles['header-input']}
|
||||
/>
|
||||
<Button
|
||||
radius={0}
|
||||
color={"gray"}
|
||||
variant={'default'}
|
||||
className={styles['header-button']}
|
||||
>Поиск</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Header;
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Center, Image, rem, Stack, Tooltip, UnstyledButton, useMantineColorScheme} from '@mantine/core';
|
||||
import {IconCash, IconHome2, IconLogout, IconMoon, IconSun,} from '@tabler/icons-react';
|
||||
import {IconCash, IconHome2, IconLogout, IconMan, IconMoon, IconSun,} from '@tabler/icons-react';
|
||||
import classes from './Navbar.module.css';
|
||||
import {useAppDispatch} from "../../redux/store.ts";
|
||||
import {logout} from "../../features/authSlice.ts";
|
||||
@@ -40,7 +40,11 @@ const mockdata = [
|
||||
label: 'Сделки',
|
||||
href: '/leads'
|
||||
},
|
||||
|
||||
{
|
||||
icon: IconMan,
|
||||
label: 'Клиенты',
|
||||
href: '/clients'
|
||||
}
|
||||
];
|
||||
|
||||
export function Navbar() {
|
||||
@@ -81,7 +85,8 @@ export function Navbar() {
|
||||
</div>
|
||||
|
||||
<Stack justify="center" gap={0}>
|
||||
<NavbarLink label={"Сменить тему"} onClick={toggleColorScheme} icon={colorScheme == "dark" ? IconSun : IconMoon} href={"#"} index={-1}/>
|
||||
<NavbarLink label={"Сменить тему"} onClick={toggleColorScheme}
|
||||
icon={colorScheme == "dark" ? IconSun : IconMoon} href={"#"} index={-1}/>
|
||||
<NavbarLink index={-1} href={"#"} onClick={onLogoutClick} icon={IconLogout} label="Выйти"/>
|
||||
</Stack>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user