components
This commit is contained in:
commit
009a214b40
40 changed files with 966 additions and 0 deletions
9
SurveyFrontend/src/components/Header/Header.module.css
Normal file
9
SurveyFrontend/src/components/Header/Header.module.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*Header.module.css*/
|
||||
|
||||
.header{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
/*justify-content: space-between;*/
|
||||
}
|
||||
28
SurveyFrontend/src/components/Header/Header.tsx
Normal file
28
SurveyFrontend/src/components/Header/Header.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import React, {useState} from "react";
|
||||
import Logo from "../Logo/Logo.tsx";
|
||||
import Account from "../Account/Account.tsx";
|
||||
import styles from './Header.module.css'
|
||||
import SurveyPagesList from "../SurveyPagesList/SurveyPagesList.tsx";
|
||||
|
||||
interface HeaderProps {}
|
||||
|
||||
const Header: React.FC<HeaderProps> = () => {
|
||||
const [activePage, setActivePage] = useState('Создать опрос');
|
||||
|
||||
const handlePageClick = (name: string)=> {
|
||||
setActivePage(name);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<Logo href='' />
|
||||
<SurveyPagesList
|
||||
activePage={activePage}
|
||||
onPageClick = {handlePageClick}
|
||||
/>
|
||||
<Account href='' />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
Loading…
Add table
Add a link
Reference in a new issue