@material-ui/icons#Group JavaScript Examples

The following examples show how to use @material-ui/icons#Group. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Home.js    From pwa with MIT License 6 votes vote down vote up
buttons = [
  {
    icon: <Person style={{ color: '#00ffba' }} />,
    name: 'me',
    link: '/my-activities',
  },
  {
    icon: <Group style={{ color: '#00ffba' }} />,
    name: 'family',
    link: '/family-activities',
  },
  {
    icon: <Map style={{ color: '#f1e200' }} />,
    name: 'map',
    link: '/map',
  },
  {
    icon: <Assignment style={{ color: '#f1e200' }} />,
    name: 'informing',
    link: '/informing',
  },
  // {
  //     icon: <Room style={{color: "#ff006f"}}/>,
  //     name: "places",
  //     link: "/places",
  // },
  // {
  //     icon: <Info style={{color: "#ff006f"}}/>,
  //     name: "about-us",
  //     link: "/about-us",
  // },
]
Example #2
Source File: TranscriptItem.js    From symbl-twilio-video-react with Apache License 2.0 4 votes vote down vote up
export default function TranscriptItem({from = {}, description, timeDiff = {}, editable, updateTranscript, index}) {
    const classes = useStyles();
    const speakerName = from.name;
    const editRef = useRef(null);
    const [isEditable, setIsEditable] = useState(false);
    const [showEditIcon, setShowEditIcon] = useState(false);
    const [text, setText] = useState(description);
    const onBlur = () => setTimeout(() => setIsEditable(false), 0);
    const handleEditIconClick = () => {
        window.editRef = editRef
        setIsEditable(true);
    }
    useEffect(() => {
        if (editable && isEditable) {
            editRef.current.focus();
        }
    }, [isEditable, editable])
    const handleDescriptionChange = (e) => setText(e.target.value);
    return (<Grid item className={classes.item}>
        <Grid item className={classes.avatarContainer}>
            <Avatar
                className={classes.speakerAvatar}
                style={{backgroundColor: 'inherit'}}
            >
                {!!speakerName ? (
                    speakerName.includes('Multiple Speakers') ? (
                        <Group/>
                    ) : !isPhoneNumber(speakerName) ? (
                        <Typography
                            style={{fontSize: 16}}
                            id={'avatar_' + from.userId}
                            variant={'body1'}
                        >
                            {getTextAvatarContent(speakerName)}
                        </Typography>
                    ) : (
                        <PhoneIcon/>
                    )
                ) : null}
            </Avatar>

        </Grid>
        {
            editable ? (
                <Grid item className={classes.transcript} onMouseEnter={() => setShowEditIcon(true)}
                      onMouseLeave={() => setShowEditIcon(false)}>
                    {showEditIcon && !isEditable &&
                    <EditIcon onClick={handleEditIconClick} color={"action"} className={classes.editIcon}/>}
                    <div>
                        <Typography className={classes.timeText}>
                            {speakerName} &nbsp;
                            {[
                                (timeDiff.hours === '00' ? '' : timeDiff.hours + ':') +
                                timeDiff.minutes,
                                timeDiff.seconds
                            ].join(':')}
                        </Typography>
                    </div>

                    {(isEditable) ?
                        <EditableText ref={editRef} updateTranscript={() => {
                            updateTranscript(index, text)
                        }}
                                      dismissEdit={onBlur}
                                      value={text}
                                      handleChange={handleDescriptionChange}
                                      onBlur={onBlur} classes={classes}
                        /> :
                        <Typography variant="caption" className={classes.description}>{description}</Typography>
                    }
                </Grid>
            ) : (
                <Grid item className={classes.transcript}>
                    <div>
                        <Typography className={classes.timeText}>
                            {speakerName} &nbsp;
                            {[
                                (timeDiff.hours === '00' ? '' : timeDiff.hours + ':') +
                                timeDiff.minutes,
                                timeDiff.seconds
                            ].join(':')}
                        </Typography>
                    </div>
                    <Typography variant="caption" className={classes.description}>{description}</Typography>
                </Grid>
            )
        }

    </Grid>);
}