mad formatting

This commit is contained in:
Christopher committed 2021-03-02 20:41:25 +01:00
1 parent 6777498bcc
commit 046447b0fb
74 files changed
+329 -309

No files matched your search

+2 -2
View File
@@ -8,8 +8,8 @@ const useStyles = makeStyles({
},
msg: {
maxWidth: '300px',
wordWrap: 'break-word',
fontSize: '1em'
wordWrap: 'break-word',
fontSize: '1em',
},
});
+6 -3
View File
@@ -28,7 +28,7 @@ interface IContextMenuOption {
selected?: boolean;
icon?: React.ReactNode;
key?: string;
};
}
interface IContextMenuProps {
open: boolean;
@@ -64,8 +64,11 @@ export const ContextMenu = ({ open, onClose, options }: IContextMenuProps) => {
onClose();
}}
>
{option.icon && <ListItemIcon >{option.icon}</ListItemIcon>}
<ListItemText primary={option.label} secondary={option.description} />
{option.icon && <ListItemIcon>{option.icon}</ListItemIcon>}
<ListItemText
primary={option.label}
secondary={option.description}
/>
</ListItem>
))}
</List>
+2 -12
View File
@@ -3,23 +3,13 @@ import { AppIcon } from './AppIcon';
import { Box, Grid } from '@material-ui/core';
import { Link } from 'react-router-dom';
export const GridMenu = ({
items,
Component = AppIcon,
xs = undefined,
}) => {
export const GridMenu = ({ items, Component = AppIcon, xs = undefined }) => {
return (
<Grid container alignItems='center' direction='row'>
{items &&
items.length &&
items.map((item) => (
<Grid
item
xs={xs}
key={item.id}
alignItems='center'
justify='center'
>
<Grid item xs={xs} key={item.id} alignItems='center' justify='center'>
<Box textAlign='center'>
<Link to={item.path}>
<Component {...item} />
@@ -2,15 +2,15 @@ import React from 'react';
import { makeStyles } from '@material-ui/core';
interface IProps {
src: string,
alt: string
src: string;
alt: string;
}
const useStyles = makeStyles({
root: {
width: '100%',
objectFit: 'contain'
}
objectFit: 'contain',
},
});
export const PictureResponsive = ({ src, alt }: IProps) => {
+3 -3
View File
@@ -6,9 +6,9 @@ interface IStyleProps {
}
interface IProps {
src: string,
alt: string,
size?: string
src: string;
alt: string;
size?: string;
}
const useStyles = makeStyles<Theme, IStyleProps>({
+7 -1
View File
@@ -56,5 +56,11 @@ export const StatusIconButton = ({
...props
}: Omit<IconButtonProps, 'color'> & { color: StatusButtonStyleColor }) => {
const classes = useStyles({ color });
return <IconButton className={`${classes.root} ${className}`} size={size} {...props} />;
return (
<IconButton
className={`${classes.root} ${className}`}
size={size}
{...props}
/>
);
};
+3 -4
View File
@@ -1,15 +1,14 @@
import { useContext } from 'react';
import { SnackbarContext } from '../providers/SnackbarProvider';
export interface IAlert {
message: string;
type: 'success' | 'error' | 'info'
type: 'success' | 'error' | 'info';
}
interface ISnackBar {
addAlert: ({ message, type}: IAlert) => void;
addAlert: ({ message, type }: IAlert) => void;
alert: IAlert | null;
}
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
+1 -1
View File
@@ -12,4 +12,4 @@ export interface AppWrapperTypes {
children?: JSX.Element | JSX.Element[];
style?: CSSProperties;
handleClickAway?: (...args: any[]) => void;
}
}