mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
Merge pull request #29 from Re-Ignited-Development/improv/events
Improv/events
This commit is contained in:
3 files changed
+40
-13
No files matched your search
@@ -3,6 +3,7 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||
import Avatar from "@material-ui/core/Avatar";
|
||||
import { green } from "@material-ui/core/colors";
|
||||
import { Button } from "@material-ui/core";
|
||||
import Nui from "../../os/nui-events/utils/Nui";
|
||||
|
||||
interface IStyles {
|
||||
root: any;
|
||||
@@ -28,13 +29,18 @@ const useStyles = makeStyles(
|
||||
})
|
||||
);
|
||||
|
||||
export const AppIcon = ({ name, icon, backgroundColor, color }) => {
|
||||
export const AppIcon = ({ id, name, icon, backgroundColor, color }) => {
|
||||
const classes = useStyles({
|
||||
backgroundColor: backgroundColor || green[50],
|
||||
color: color || green[400],
|
||||
});
|
||||
|
||||
const openAppCallback = () => {
|
||||
Nui.send(`phone:app:${id}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<Button className={classes.root}>
|
||||
<Button onClick={openAppCallback} className={classes.root}>
|
||||
<Avatar className={classes.avatar}>
|
||||
{icon || name[0].toUpperCase()}
|
||||
</Avatar>
|
||||
|
||||
Reference in new issue
Block a user