mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -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} />;
|
||||
};
|
||||
Reference in new issue
Block a user