@material-ui/icons#GroupSharp JavaScript Examples

The following examples show how to use @material-ui/icons#GroupSharp. 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: index.jsx    From redive_linebot with MIT License 5 votes vote down vote up
GroupRecordSummary = ({ group, rank }) => {
  const classes = useStyles();
  let data = rank || [];
  const [textCount, stickerCount, imageCount] = [
    sumData(data, "textCnt"),
    sumData(data, "stickerCnt"),
    sumData(data, "imageCnt"),
  ];
  const factCount = data.length;
  const groupCount = get(group, "count", 0);

  const SummaryData = [
    { CusIcon: Flag, title: "群組類別", content: "聊天群" },
    { CusIcon: GroupSharp, title: "紀錄/群組 人數", content: `${factCount}/${groupCount}` },
    { CusIcon: Forum, title: "訊息次數", content: textCount },
    { CusIcon: Image, title: "圖片次數", content: imageCount },
    { CusIcon: InsertEmoticon, title: "貼圖次數", content: stickerCount },
  ];

  return (
    <Grid container item direction="row" justifyContent="center">
      {SummaryData.map((data, index) => (
        <Grid container xs={2} item className={classes.card} key={index}>
          <Grid item xs={2}>
            <data.CusIcon />
          </Grid>
          <Grid container item xs={10} direction="column" spacing={1}>
            <Grid item>
              <Typography variant="subtitle1" color="textSecondary">
                {get(data, "title")}
              </Typography>
            </Grid>
            <Grid item>
              <Typography variant="subtitle2">{get(data, "content")}</Typography>
            </Grid>
          </Grid>
        </Grid>
      ))}
    </Grid>
  );
}