mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
formatting
This commit is contained in:
1 parent
e48263838f
commit
3a1bd75f97
23 files changed
+309
-236
No files matched your search
@@ -4,13 +4,12 @@ import { Button, TextField } from "@material-ui/core";
|
||||
import Nui from "../../../os/nui-events/utils/Nui";
|
||||
import List from "@material-ui/core/List";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import Modal from '../../../ui/components/Modal';
|
||||
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 Modal from "../../../ui/components/Modal";
|
||||
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";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
button: {
|
||||
@@ -26,32 +25,32 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
height: "20%",
|
||||
},
|
||||
clearButton: {
|
||||
width: '10%',
|
||||
position: 'absolute',
|
||||
right: 0
|
||||
width: "10%",
|
||||
position: "absolute",
|
||||
right: 0,
|
||||
},
|
||||
textInputField: {
|
||||
fontSize: 20,
|
||||
borderBottomColor: 'red'
|
||||
borderBottomColor: "red",
|
||||
},
|
||||
addBtn: {
|
||||
margin: 'auto',
|
||||
margin: "auto",
|
||||
fontSize: 16,
|
||||
width: 150,
|
||||
background: "#2196f3",
|
||||
marginBottom: 10,
|
||||
padding: 8
|
||||
padding: 8,
|
||||
},
|
||||
cancelBtn: {
|
||||
margin: 'auto',
|
||||
margin: "auto",
|
||||
width: 150,
|
||||
background: "#232323",
|
||||
marginBottom: 20,
|
||||
padding: 8
|
||||
padding: 8,
|
||||
},
|
||||
icons: {
|
||||
marginRight: 5
|
||||
}
|
||||
marginRight: 5,
|
||||
},
|
||||
}));
|
||||
|
||||
export const AddContactModal = () => {
|
||||
@@ -69,25 +68,27 @@ export const AddContactModal = () => {
|
||||
Nui.send("contacts:add", {
|
||||
name,
|
||||
number,
|
||||
avatar
|
||||
avatar,
|
||||
});
|
||||
console.log(name, number, avatar);
|
||||
}
|
||||
};
|
||||
|
||||
const _handleClose = () => {
|
||||
setShowModal(false)
|
||||
}
|
||||
setShowModal(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal visible={showModal} handleClose={_handleClose}>
|
||||
<Button onClick={_handleClose} className={classes.clearButton}><ClearIcon /></Button>
|
||||
<Button onClick={_handleClose} className={classes.clearButton}>
|
||||
<ClearIcon />
|
||||
</Button>
|
||||
<List style={{ marginTop: 30 }}>
|
||||
<ListItem>
|
||||
<PersonIcon className={classes.icons} />
|
||||
<TextField
|
||||
value={name}
|
||||
inputProps={{ className: classes.textInputField}}
|
||||
inputProps={{ className: classes.textInputField }}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
fullWidth
|
||||
variant="standard"
|
||||
@@ -98,7 +99,7 @@ export const AddContactModal = () => {
|
||||
<PhoneIcon className={classes.icons} />
|
||||
<TextField
|
||||
value={number}
|
||||
inputProps={{ className: classes.textInputField}}
|
||||
inputProps={{ className: classes.textInputField }}
|
||||
onChange={(e) => setNumber(e.target.value)}
|
||||
fullWidth
|
||||
placeholder="Number"
|
||||
@@ -110,7 +111,7 @@ export const AddContactModal = () => {
|
||||
<AccountCircleIcon className={classes.icons} />
|
||||
<TextField
|
||||
value={avatar}
|
||||
inputProps={{ className: classes.textInputField}}
|
||||
inputProps={{ className: classes.textInputField }}
|
||||
onChange={(e) => setAvatar(e.target.value)}
|
||||
fullWidth
|
||||
placeholder="Avatar URL"
|
||||
@@ -118,8 +119,10 @@ export const AddContactModal = () => {
|
||||
type="text"
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
<Button className={classes.addBtn} onClick={addContact}>Add Contact</Button>
|
||||
</List>
|
||||
<Button className={classes.addBtn} onClick={addContact}>
|
||||
Add Contact
|
||||
</Button>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user