Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

683 B
Raw Blame
import cx from "classnames";

import { Link } from "metabase/common/components/Link";
import CS from "metabase/css/core/index.css";
import { Box, FixedSizeIcon, Group } from "metabase/ui";
import type { IconName } from "metabase-types/api";

import S from "./GraphLink.module.css";

type GraphLinkProps = {
  label: string;
  icon: IconName;
  url: string;
};

export function GraphLink({ label, icon, url }: GraphLinkProps) {
  return (
    <Box className={cx(S.link, CS.textWrap)} component={Link} to={url}>
      <Group gap="sm" align="center" wrap="nowrap">
        <FixedSizeIcon name={icon} c="core-brand" />
        <Box lh="h4">{label}</Box>
      </Group>
    </Box>
  );
}