mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
import { Avatar, makeStyles } from '@material-ui/core';
|
|
import { FC } from 'react';
|
|
|
|
interface HighlightAvatarProps {
|
|
color: string;
|
|
}
|
|
|
|
const useStyles = makeStyles({
|
|
root: (props: HighlightAvatarProps) => ({
|
|
backgroundColor: props.color
|
|
})
|
|
});
|
|
|
|
const HighlightAvatar: FC<HighlightAvatarProps> = (props) => {
|
|
const classes = useStyles(props);
|
|
return <Avatar className={classes.root}>{props.children}</Avatar>;
|
|
};
|
|
|
|
export default HighlightAvatar;
|