Files
new-phone-who-dis/phone/src/apps/marketplace/components/navigation/NavigationBar.tsx
T
Taso b14562eb9d tweak(phone): Remove FontAwesome dependency
All icons were switched to @material-ui/icons
2021-04-13 22:49:05 -04:00

34 lines
982 B
TypeScript

import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Link } from 'react-router-dom';
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
import { AddCircle, Home } from '@material-ui/icons/';
const useStyles = makeStyles((theme) => ({
root: {
width: '100%',
backgroundColor: theme.palette.background.default,
},
icon: {
color: theme.palette.primary.main,
},
}));
export const NavigationBar = () => {
const classes = useStyles();
const [activePage, setActivePage] = useState(0);
return (
<BottomNavigation
value={activePage}
onChange={(event, newPage) => {
setActivePage(newPage);
}}
showLabels
className={classes.root}
>
<BottomNavigationAction component={Link} icon={<Home />} to="/marketplace" />
<BottomNavigationAction component={Link} icon={<AddCircle />} to="/marketplace/new" />
</BottomNavigation>
);
};