MSP-3237 create Header
This commit is contained in:
1 parent
634c8e0e4c
commit
c2f73d0bc2
3 files changed
+57
No files matched your search
@@ -0,0 +1,9 @@
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 28px;
|
||||
width: 100%;
|
||||
height: 65px;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface HeaderPropsType {
|
||||
title: string
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
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 {
|
||||
ui: { name, primaryColor }
|
||||
} = useAppSelector((state) => state.UIReducer)
|
||||
|
||||
return (
|
||||
<section
|
||||
className="header"
|
||||
style={{
|
||||
backgroundColor: primaryColor
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
href: '/',
|
||||
title: (
|
||||
<>
|
||||
<HomeOutlined />
|
||||
<span>Главная</span>
|
||||
</>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <span>{title}</span>
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<span>{name}</span>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
export default Header
|
||||
Reference in new issue
Block a user