mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Feat: Dial section
Still WIP
This commit is contained in:
1 parent
5a9707ae3c
commit
d6e9a85b40
8 files changed
+221
-4
No files matched your search
@@ -0,0 +1,54 @@
|
||||
import React, { ChangeEvent, useState } from 'react';
|
||||
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faHome } from '@fortawesome/free-solid-svg-icons';
|
||||
import AddCircleIcon from '@material-ui/icons/AddCircle';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||
import PhoneCallbackIcon from '@material-ui/icons/PhoneCallback';
|
||||
import PhoneIcon from '@material-ui/icons/Phone';
|
||||
import { History } from '@material-ui/icons';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
root: {
|
||||
width: '100%',
|
||||
backgroundColor: theme.palette.background.default,
|
||||
},
|
||||
icon: {
|
||||
color: '#43a047',
|
||||
},
|
||||
}));
|
||||
|
||||
const DialerNavBar = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
const [page, setPage] = useState(0);
|
||||
|
||||
const handleChange = (event: ChangeEvent<{}>, newPage) => {
|
||||
setPage(newPage);
|
||||
};
|
||||
|
||||
return (
|
||||
<BottomNavigation
|
||||
value={page}
|
||||
onChange={handleChange}
|
||||
showLabels
|
||||
className={classes.root}
|
||||
>
|
||||
<BottomNavigationAction
|
||||
label='History'
|
||||
component={Link}
|
||||
icon={<History />}
|
||||
to='/phone'
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
component={Link}
|
||||
icon={<PhoneIcon />}
|
||||
to='/phone/dial'
|
||||
label='Call'
|
||||
/>
|
||||
</BottomNavigation>
|
||||
);
|
||||
};
|
||||
|
||||
export default DialerNavBar;
|
||||
Reference in new issue
Block a user