From 4bcabf751b8292fee696db5e027f38b1838b0be6 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 11 Aug 2020 21:38:47 +0300 Subject: feat: add mobile header --- src/components/Header/BottomBar.tsx | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/Header/BottomBar.tsx (limited to 'src/components/Header/BottomBar.tsx') diff --git a/src/components/Header/BottomBar.tsx b/src/components/Header/BottomBar.tsx new file mode 100644 index 0000000..57efb3e --- /dev/null +++ b/src/components/Header/BottomBar.tsx @@ -0,0 +1,39 @@ +import React from 'react'; +import { AppBar, Toolbar } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; + +interface PropTypes { + profile: JSX.Element; + feed: JSX.Element; + notifications: JSX.Element; +} + +const useStyles = makeStyles(theme => ({ + root: { + top: 'auto', + bottom: 0 + }, + toolbar: { + display: 'flex', + justifyContent: 'space-around' + } +})); + + +const BottomBar: React.FC = React.memo(props => { + const classes = useStyles(); + const { profile, feed, notifications } = props; + + return ( + + + {notifications} + {feed} + {profile} + + + ); +}); + +export default BottomBar; + -- cgit v1.2.3 From a9d713a73b65847af419016d2d97c4e8dab950f9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 11 Aug 2020 22:00:10 +0300 Subject: refactor: cleanup header components --- src/components/Header/BottomBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/Header/BottomBar.tsx') diff --git a/src/components/Header/BottomBar.tsx b/src/components/Header/BottomBar.tsx index 57efb3e..67fe219 100644 --- a/src/components/Header/BottomBar.tsx +++ b/src/components/Header/BottomBar.tsx @@ -8,7 +8,7 @@ interface PropTypes { notifications: JSX.Element; } -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles({ root: { top: 'auto', bottom: 0 @@ -17,7 +17,7 @@ const useStyles = makeStyles(theme => ({ display: 'flex', justifyContent: 'space-around' } -})); +}); const BottomBar: React.FC = React.memo(props => { -- cgit v1.2.3