From c7f2999ee797ea5e3bfb29517a4f13206162cc6f Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 14 Jun 2020 19:52:35 +0300 Subject: refactor: use lowercase in folder names --- src/components/Header/Header.tsx | 68 +++++++++++++++++++++++++++++++++++++ src/components/Header/SearchBar.tsx | 31 +++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 src/components/Header/Header.tsx create mode 100644 src/components/Header/SearchBar.tsx (limited to 'src/components/Header') diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx new file mode 100644 index 0000000..0ee6b5f --- /dev/null +++ b/src/components/Header/Header.tsx @@ -0,0 +1,68 @@ +import React from 'react'; +import { + AppBar, + Toolbar, + IconButton, + Typography +} from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import AccountCircle from '@material-ui/icons/AccountCircle'; +import NotificationsIcon from '@material-ui/icons/Notifications'; +import HomeIcon from '@material-ui/icons/Home'; + +import SearchBar from './SearchBar'; + +interface PropTypes { + setPage: (newPage: string) => void; +} + +const useStyles = makeStyles({ + root: { + display: 'flex', + justifyContent: 'space-around', + width: '60%', + margin: 'auto' + }, + logo: { + fontWeight: 'bold' + } +}); + +const Header: React.FC = ({ setPage }) => { + const classes = useStyles(); + + const handleHome = (): void => { + setPage('feed'); + }; + + const handleProfile = (): void => { + setPage('profile'); + }; + + const handleNotifications = (): void => {}; + + return ( + + + + Which + + +
+ + + + + + + + + +
+
+
+ ); +}; + +export default Header; + diff --git a/src/components/Header/SearchBar.tsx b/src/components/Header/SearchBar.tsx new file mode 100644 index 0000000..182a1a4 --- /dev/null +++ b/src/components/Header/SearchBar.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import SearchIcon from '@material-ui/icons/Search'; +import { InputBase } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; + +const useStyles = makeStyles(theme => ({ + root: { + background: 'rgba(255, 255, 255, 0.5)', + borderRadius: '2px', + padding: theme.spacing(0.5), + display: 'flex', + alignItems: 'center' + } +})); + +const SearchBar: React.FC = () => { + const classes = useStyles(); + + return ( +
+ + +
+ ); +}; + + +export default SearchBar; + -- cgit v1.2.3