MSP-3288 change Header

This commit is contained in:
Anastasiia committed 2024-05-16 16:18:56 +03:00
1 parent 24dea52b30
commit 108a4b63b5
3 files changed
+30 -28

No files matched your search

+24 -3
View File
@@ -1,9 +1,30 @@
.header {
display: flex;
align-items: center;
padding: 0 28px;
width: 100%;
height: 65px;
justify-content: space-between;
justify-content: center;
box-sizing: border-box;
}
line-height: 18px;
&__text {
margin: auto;
background: inherit;
-webkit-background-clip: text;
color: transparent;
filter: invert(1) grayscale(1);
font-size: 19px;
font-weight: 600;
font-family: 'PT Sans', sans-serif;
padding-right: 120px;
}
&__text-closed {
margin: auto;
background: inherit;
-webkit-background-clip: text;
color: transparent;
filter: invert(1) grayscale(1);
font-weight: 600;
font-family: 'PT Sans', sans-serif;
}
}
+2 -2
View File
@@ -1,3 +1,3 @@
export interface HeaderPropsType {
title: string
}
collapsed: boolean
}
+4 -23
View File
@@ -1,13 +1,10 @@
import { HomeOutlined } from '@ant-design/icons'
import { Breadcrumb } from 'antd'
import { HeaderPropsType } from '@widgets/Header/header.type.ts'
import { useAppSelector } from '@hooks/redux.ts'
import './header.scss'
const Header = ({ title }: HeaderPropsType) => {
const Header = ({ collapsed }: HeaderPropsType) => {
const {
ui: { name, primaryColor }
} = useAppSelector((state) => state.UIReducer)
@@ -19,25 +16,9 @@ const Header = ({ title }: HeaderPropsType) => {
backgroundColor: primaryColor
}}
>
<div>
<Breadcrumb
items={[
{
href: '/',
title: (
<>
<HomeOutlined />
<span>Главная</span>
</>
)
},
{
title: <span>{title}</span>
}
]}
/>
</div>
<span>{name}</span>
<span className={collapsed ? 'header__text-closed' : 'header__text'}>
{name}
</span>
</section>
)
}