mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
Make styling!!
This commit is contained in:
1 parent
0bbd463c01
commit
bc20bfac99
13 files changed
+115
-114
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Box, makeStyles, Backdrop } from "@material-ui/core";
|
||||
import { Box, makeStyles, Backdrop, Paper } from "@material-ui/core";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
box: {
|
||||
@@ -10,6 +10,10 @@ const useStyles = makeStyles((theme) => ({
|
||||
position: "absolute",
|
||||
zIndex: 1,
|
||||
},
|
||||
paper: {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
},
|
||||
}));
|
||||
|
||||
export const AppContent = ({
|
||||
@@ -21,19 +25,15 @@ export const AppContent = ({
|
||||
}) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Box
|
||||
px={2}
|
||||
pt={1}
|
||||
flexGrow={1}
|
||||
style={{ width: "100%", ...props }}
|
||||
{...props}
|
||||
>
|
||||
<Backdrop
|
||||
className={classes.backdrop}
|
||||
open={backdrop}
|
||||
onClick={onClickBackdrop}
|
||||
></Backdrop>
|
||||
{children}
|
||||
<Box flexGrow={1} className={classes.box} {...props}>
|
||||
<Paper square px={2} pt={1} elevation={0} className={classes.paper}>
|
||||
<Backdrop
|
||||
className={classes.backdrop}
|
||||
open={backdrop || false}
|
||||
onClick={onClickBackdrop}
|
||||
></Backdrop>
|
||||
{children}
|
||||
</Paper>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -1,10 +1,22 @@
|
||||
import React from "react";
|
||||
import { Typography, Box } from "@material-ui/core";
|
||||
import { Typography, Box, makeStyles } from "@material-ui/core";
|
||||
|
||||
export const AppTitle = ({ children, style, ...props }) => {
|
||||
const useStyle = makeStyles(theme => ({
|
||||
root: ({ color }) => ({
|
||||
width: '100%',
|
||||
textAlign: 'center',
|
||||
backgroundColor: color || theme.palette.background.default
|
||||
}),
|
||||
text: {
|
||||
color: theme.palette.text.primary
|
||||
}
|
||||
}));
|
||||
|
||||
export const AppTitle = ({ children, color, ...props }) => {
|
||||
const classes = useStyle({ color });
|
||||
return (
|
||||
<Box px={2} pt={4} style={{ width: '100%', ...props }} {...props}>
|
||||
<Typography paragraph variant="h4">{children}</Typography>
|
||||
<Box px={2} pt={4} className={classes.root} {...props}>
|
||||
<Typography className={classes.text} paragraph variant="h4">{children}</Typography>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -10,6 +10,7 @@ export const AppWrapper = ({ children, style, handleClickAway, ...props }) => {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
position: 'relative',
|
||||
flexDirection: "column",
|
||||
...style,
|
||||
}}
|
||||
|
||||
@@ -6,13 +6,14 @@ import {
|
||||
ListItemText,
|
||||
Slide,
|
||||
makeStyles,
|
||||
Paper,
|
||||
} from "@material-ui/core";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
width: "100%",
|
||||
backgroundColor: theme.palette.background.default,
|
||||
color: "black",
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
zIndex: 2,
|
||||
},
|
||||
}));
|
||||
@@ -21,12 +22,12 @@ export const ContextMenu = ({ open, onClose, options }) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Slide direction="up" in={open} mountOnEnter unmountOnExit>
|
||||
<div className={classes.root}>
|
||||
<List component="nav" aria-label="context menu">
|
||||
<Paper square className={classes.root}>
|
||||
<List aria-label="context menu">
|
||||
{options.map((option) => (
|
||||
<ListItem
|
||||
button
|
||||
key={option.key}
|
||||
key={option.key || option.label}
|
||||
onClick={(e) => {
|
||||
option.onClick(e, option);
|
||||
onClose();
|
||||
@@ -37,7 +38,7 @@ export const ContextMenu = ({ open, onClose, options }) => {
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
</div>
|
||||
</Paper>
|
||||
</Slide>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user