@material-ui/icons#CheckCircleOutlined TypeScript Examples

The following examples show how to use @material-ui/icons#CheckCircleOutlined. 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: ProposalTableRow.tsx    From homebase-app with MIT License 4 votes vote down vote up
ProposalTableRow: React.FC<{ proposal: Proposal }> = ({
  proposal,
}) => {
  const history = useHistory();
  const theme = useTheme();
  const isMobileSmall = useMediaQuery(theme.breakpoints.down("sm"));
  const { cycleInfo } = useDAO(proposal.dao.data.address);

  const formattedDate = dayjs(proposal.startDate).format("LLL");
  const { data: agoraPost } = useAgoraTopic(
    Number(proposal.metadata.agoraPostId)
  );

  const onClick = useCallback(() => {
    history.push(
      `/explorer/dao/${proposal.dao.data.address}/proposal/${proposal.id}`
    );
  }, [history, proposal.dao.data.address, proposal.id]);

  return (
    <RowContainer item container alignItems="center" onClick={onClick}>
      <Grid item xs={12} md={9}>
        <Box>
          <Typography
            variant="h4"
            color="textSecondary"
            align={isMobileSmall ? "center" : "left"}
          >
            {agoraPost
              ? agoraPost.title
              : `Proposal ${toShortAddress(proposal.id)}`}
          </Typography>
        </Box>
        <RowContent>
          <Grid
            container
            direction={isMobileSmall ? "column" : "row"}
            alignItems={isMobileSmall ? "center" : "flex-start"}
            wrap="nowrap"
            style={{ gap: 32 }}
          >
            {cycleInfo && (
              <TableStatusBadge
                status={proposal.getStatus(cycleInfo.currentLevel).status}
              />
            )}

            <ArrowInfo color="textSecondary">Created {formattedDate}</ArrowInfo>
          </Grid>
        </RowContent>
      </Grid>
      <ArrowContainer
        item
        md={3}
        container
        direction="row"
        alignItems="center"
        justify="flex-end"
      >
        <>
          {status === ProposalStatus.ACTIVE ? (
            <PlayCircleOutlineOutlined htmlColor="#FFC839" fontSize={"large"} />
          ) : null}
          {status === ProposalStatus.PENDING ? (
            <PauseCircleOutline
              htmlColor="rgba(56, 102, 249)"
              fontSize={"large"}
            />
          ) : null}
          {status === ProposalStatus.PASSED ? (
            <CheckCircleOutlined fontSize={"large"} color="secondary" />
          ) : null}
          {status === ProposalStatus.NO_QUORUM ? (
            <RemoveCircleOutline
              fontSize={"large"}
              htmlColor="rgb(61, 61, 61)"
            />
          ) : null}
          {status === ProposalStatus.EXECUTED ? (
            <CheckCircleOutlined fontSize={"large"} color="secondary" />
          ) : null}
          {status === ProposalStatus.EXPIRED ? (
            <CancelOutlined fontSize={"large"} htmlColor="rgb(61, 61, 61)" />
          ) : null}
          {status === ProposalStatus.REJECTED ? (
            <CancelOutlined fontSize={"large"} color="error" />
          ) : null}
          {status === ProposalStatus.DROPPED ? (
            <CancelOutlined fontSize={"large"} color="error" />
          ) : null}
          <StatusText color="textSecondary">{status}</StatusText>
        </>
        <ArrowButton>
          <ArrowForwardIcon fontSize={"large"} color="inherit" />
        </ArrowButton>
      </ArrowContainer>
    </RowContainer>
  );
}