import React from "react"; import CancelIcon from "@mui/icons-material/Cancel"; import CheckCircleIcon from "@mui/icons-material/CheckCircle"; import WarningIcon from "@mui/icons-material/Warning"; import { ChipPropsSizeOverrides } from "@mui/material/Chip"; import { OverridableStringUnion } from "@mui/types"; import Chip from "../Chip"; import { Pill } from "./shared"; export interface CardPillProps extends Pill { size?: OverridableStringUnion<"small" | "medium", ChipPropsSizeOverrides>; variant?: "filled" | "outlined"; } // TODO Logic for picking icon export const CardPill: React.FC = ({ label, color, icon, size = "small", variant, }) => { let resolvedIcon: React.ReactElement | undefined; if (icon === undefined) { if (color === "success") { resolvedIcon = ; } else if (color === "warning") { resolvedIcon = ; } else { resolvedIcon = ; } } else { resolvedIcon = icon ?? undefined; } return ( ); }; export default CardPill;