@mui/icons-material#Link TypeScript Examples

The following examples show how to use @mui/icons-material#Link. 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: PackagesUsed.tsx    From fluttertemplates.dev with MIT License 5 votes vote down vote up
export default function PackagesUsed(params: Props) {
  return (
    <Grid
      container
      direction="column"
      justifyContent="center"
      alignItems="center"
      spacing={1}
      style={{
        height: "80%",
        width: "100%",
      }}
    >
      {params.packages.length === 0 && (
        <Grid item>
          <img
            src="/no_packages.svg"
            alt="No Packages Used"
            style={{
              height: "30vh",
            }}
          />
        </Grid>
      )}
      {params.packages.length === 0 && (
        <Grid item>
          <Typography>No Packages Used</Typography>
        </Grid>
      )}

      {params.packages.map((packageName) => (
        <Grid item key={packageName}>
          <a
            href={packageName}
            target="_blank"
            rel="noopener noreferrer"
            style={{
              color: "transparent",
            }}
          >
            <Button
              style={{
                textTransform: "none",
              }}
            >
              <Link
                fontSize="small"
                style={{
                  marginRight: "8px",
                }}
              />
              {packageName.split("/").pop()?.toLowerCase()}
              <img
                src={`https://img.shields.io/pub/v/${packageName
                  .split("/")
                  .pop()}.svg`}
                alt={packageName}
                style={{
                  marginLeft: "8px",
                }}
              />
            </Button>
          </a>
        </Grid>
      ))}
    </Grid>
  );
}