mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Make Camera app use router (#69)
* Make Camera app use router * Remove unused hooks * Fucking communicate messages with camera with router * Improved sharing in messages flow * Fix clipboard * Removeunused imports * improve routing helpers * Fix bug :D * Fix stupid thing * Add docs to useQueryParams hook
This commit is contained in:
1 parent
447c51a07e
commit
40f9555b39
34 files changed
+481
-294
No files matched your search
@@ -18,7 +18,19 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const ContextMenu = ({ open, onClose, options }) => {
|
||||
interface IContextMenuProps {
|
||||
open: boolean;
|
||||
onClose(): void;
|
||||
options: Array<{
|
||||
onClick(e, option): void;
|
||||
label: string;
|
||||
selected?: boolean;
|
||||
icon?: React.ReactNode;
|
||||
key?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export const ContextMenu = ({ open, onClose, options }: IContextMenuProps) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Slide direction='up' in={open} mountOnEnter unmountOnExit>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Paper } from '@material-ui/core';
|
||||
import { Button, Paper } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
padding: '24px',
|
||||
zIndex: 10,
|
||||
background: '#424242',
|
||||
marginTop: '15px',
|
||||
@@ -24,6 +26,12 @@ const useStyles = makeStyles(() => ({
|
||||
displayNone: {
|
||||
display: 'none',
|
||||
},
|
||||
imageModalCloseButton: {
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
top: 0,
|
||||
width: '10%',
|
||||
},
|
||||
}));
|
||||
|
||||
export const Modal = ({ children, visible, handleClose }) => {
|
||||
@@ -48,7 +56,12 @@ export const Modal = ({ children, visible, handleClose }) => {
|
||||
|
||||
return (
|
||||
<div className={showHideClassName}>
|
||||
<Paper className={classes.root}>{children}</Paper>
|
||||
<Paper className={classes.root}>
|
||||
<Button onClick={handleClose} className={classes.imageModalCloseButton}>
|
||||
<CloseIcon />
|
||||
</Button>
|
||||
{children}
|
||||
</Paper>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user