mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Feat(Contact:Modal): New layout | Adding Avatar
This commit is contained in:
1 parent
63722a6206
commit
03e52dca7f
1 file changed
+21
-7
@@ -6,8 +6,11 @@ import List from "@material-ui/core/List";
|
|||||||
import ListItem from "@material-ui/core/ListItem";
|
import ListItem from "@material-ui/core/ListItem";
|
||||||
import Modal from '../../../ui/components/Modal';
|
import Modal from '../../../ui/components/Modal';
|
||||||
import { useModal } from '../hooks/useModal';
|
import { useModal } from '../hooks/useModal';
|
||||||
|
import ClearIcon from '@material-ui/icons/Clear';
|
||||||
|
import PersonIcon from '@material-ui/icons/Person';
|
||||||
|
import PhoneIcon from '@material-ui/icons/Phone';
|
||||||
|
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
|
||||||
|
|
||||||
import '../components/Contact.css'
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
const useStyles = makeStyles((theme: Theme) => ({
|
||||||
button: {
|
button: {
|
||||||
@@ -22,12 +25,18 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|||||||
marginLeft: "-4em",
|
marginLeft: "-4em",
|
||||||
height: "20%",
|
height: "20%",
|
||||||
},
|
},
|
||||||
|
clearButton: {
|
||||||
|
width: '10%',
|
||||||
|
position: 'absolute',
|
||||||
|
right: 0
|
||||||
|
},
|
||||||
textInputField: {
|
textInputField: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
borderBottomColor: 'red'
|
borderBottomColor: 'red'
|
||||||
},
|
},
|
||||||
addBtn: {
|
addBtn: {
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
|
fontSize: 16,
|
||||||
width: 150,
|
width: 150,
|
||||||
background: "#2196f3",
|
background: "#2196f3",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
@@ -39,6 +48,9 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|||||||
background: "#232323",
|
background: "#232323",
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
padding: 8
|
padding: 8
|
||||||
|
},
|
||||||
|
icons: {
|
||||||
|
marginRight: 5
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -69,43 +81,45 @@ export const AddContactModal = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal visible={showModal} handleClose={_handleClose}>
|
<Modal visible={showModal} handleClose={_handleClose}>
|
||||||
<List style={{ marginTop: 10 }}>
|
<Button onClick={_handleClose} className={classes.clearButton}><ClearIcon /></Button>
|
||||||
|
<List style={{ marginTop: 30 }}>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
|
<PersonIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={name}
|
value={name}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField}}
|
||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
style={{ fontSize: "18px" }}
|
|
||||||
fullWidth
|
fullWidth
|
||||||
variant="outlined"
|
variant="standard"
|
||||||
placeholder="Name"
|
placeholder="Name"
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
|
<PhoneIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={number}
|
value={number}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField}}
|
||||||
onChange={(e) => setNumber(e.target.value)}
|
onChange={(e) => setNumber(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
placeholder="Number"
|
placeholder="Number"
|
||||||
variant="outlined"
|
variant="standard"
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
|
<AccountCircleIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={avatar}
|
value={avatar}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField}}
|
||||||
onChange={(e) => setAvatar(e.target.value)}
|
onChange={(e) => setAvatar(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
placeholder="Picture link"
|
placeholder="Avatar URL"
|
||||||
variant="standard"
|
variant="standard"
|
||||||
type="text"
|
type="text"
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<Button className={classes.addBtn} onClick={addContact}>Add Contact</Button>
|
<Button className={classes.addBtn} onClick={addContact}>Add Contact</Button>
|
||||||
<Button className={classes.cancelBtn} onClick={_handleClose}>Cancel</Button>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user