feat(ott-139): header (#25)
parent
d45a32c150
commit
2564bb1557
|
After Width: | Height: | Size: 410 B |
@ -0,0 +1,11 @@ |
||||
import React from 'react' |
||||
|
||||
import { Menu } from 'features/Menu' |
||||
|
||||
import { Wrapper } from './styled' |
||||
|
||||
export const Header = () => ( |
||||
<Wrapper> |
||||
<Menu /> |
||||
</Wrapper> |
||||
) |
||||
@ -0,0 +1,6 @@ |
||||
import styled from 'styled-components/macro' |
||||
|
||||
export const Wrapper = styled.header` |
||||
display: flex; |
||||
padding-top: 16px; |
||||
` |
||||
@ -1,33 +1,10 @@ |
||||
import React from 'react' |
||||
|
||||
import styled from 'styled-components/macro' |
||||
|
||||
import { Logo } from 'features/Logo' |
||||
import { CenterBlock } from 'features/Login/styled' |
||||
import { useAuthStore } from 'features/AuthStore' |
||||
|
||||
// временные компоненты
|
||||
const TempContainer = styled.div` |
||||
margin-top: 50px; |
||||
color: white; |
||||
font-size: 20px; |
||||
display: flex; |
||||
flex-direction: column; |
||||
` |
||||
|
||||
const TempPageTitle = styled.span` |
||||
margin: 20px 0; |
||||
` |
||||
|
||||
export const HomePage = () => { |
||||
const { logout } = useAuthStore() |
||||
return ( |
||||
<CenterBlock> |
||||
<Logo /> |
||||
<TempContainer> |
||||
<TempPageTitle>HOME PAGE</TempPageTitle> |
||||
<button type='button' onClick={logout}>Logout</button> |
||||
</TempContainer> |
||||
</CenterBlock> |
||||
) |
||||
} |
||||
import { Header } from 'features/Header' |
||||
import { MainWrapper } from 'features/MainWrapper' |
||||
|
||||
export const HomePage = () => ( |
||||
<MainWrapper> |
||||
<Header /> |
||||
</MainWrapper> |
||||
) |
||||
|
||||
@ -0,0 +1,6 @@ |
||||
import styled from 'styled-components/macro' |
||||
|
||||
export const MainWrapper = styled.div` |
||||
width: 100%; |
||||
padding-left: 80px; |
||||
` |
||||
@ -0,0 +1,9 @@ |
||||
import React from 'react' |
||||
|
||||
import { Wrapper, ToggleButton } from './styled' |
||||
|
||||
export const Menu = () => ( |
||||
<Wrapper> |
||||
<ToggleButton /> |
||||
</Wrapper> |
||||
) |
||||
@ -0,0 +1,20 @@ |
||||
import styled from 'styled-components/macro' |
||||
|
||||
export const Wrapper = styled.div` |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
width: 304px; |
||||
height: 48px; |
||||
` |
||||
export const ToggleButton = styled.button` |
||||
width: 18px; |
||||
height: 16px; |
||||
background-image: url(/images/menuIcon.svg); |
||||
background-size: 100%; |
||||
background-repeat: no-repeat; |
||||
background-color: transparent; |
||||
border: none; |
||||
outline: none; |
||||
cursor: pointer; |
||||
` |
||||
Loading…
Reference in new issue