more formatting

This commit is contained in:
Christopher committed 2021-03-02 20:45:41 +01:00
1 parent 046447b0fb
commit f552c1212c
157 files changed
+635 -1579

No files matched your search

+7 -22
View File
@@ -1,9 +1,4 @@
import {
fade,
IconButton,
IconButtonProps,
makeStyles,
} from '@material-ui/core';
import { fade, IconButton, IconButtonProps, makeStyles } from '@material-ui/core';
import React from 'react';
type StatusButtonStyleColor = 'success' | 'error' | 'warning' | 'info';
@@ -15,10 +10,8 @@ interface IStatusButtonStyleProps {
const useStyles = makeStyles(
(theme) => ({
root: {
color: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].contrastText,
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].main,
color: ({ color }: IStatusButtonStyleProps) => theme.palette[color].contrastText,
backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].main,
'&:hover': {
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].light,
@@ -36,17 +29,15 @@ const useStyles = makeStyles(
},
},
contained: {
color: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].contrastText,
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].main,
color: ({ color }: IStatusButtonStyleProps) => theme.palette[color].contrastText,
backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].main,
'&:hover': {
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
theme.palette[color].dark,
},
},
}),
{ name: 'MuiIconButton' }
{ name: 'MuiIconButton' },
);
export const StatusIconButton = ({
@@ -56,11 +47,5 @@ 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} />;
};