import { Box, Tooltip } from "@mui/material";
import React from "react";

const TwoLineCell: React.FC<{ children: React.ReactNode }> = ({ children }) => {
  return (
    <Tooltip title={children}>
      <Box
        sx={{
          whiteSpace: "normal",
          overflow: "hidden",
          textOverflow: "ellipsis",
          display: "-webkit-box",
          WebkitLineClamp: 2,
          WebkitBoxOrient: "vertical",
          lineHeight: "22px",
        }}
      >
        {children}
      </Box>
    </Tooltip>
  );
};

export default TwoLineCell;
