import * as System from "~/components/system";
import * as Styles from "~/common/styles";
import * as Constants from "~/common/constants";
import * as SVG from "~/common/svg";
import LinkTag from "~/components/core/Link/LinkTag";
import { LoaderSpinner } from "~/components/system/components/Loaders";
import { css } from "@emotion/react";
const STYLES_CARD = css`
margin: 24px;
${"" /* height: 100%;
width: 100%;
max-height: 448px;
max-width: 600px; */}
height: 448px;
width: 600px;
max-height: 100%;
max-width: 100%;
border-radius: 8px;
overflow: hidden;
box-shadow: ${Constants.shadow.large};
background-color: ${Constants.system.bgGrayLight};
`;
const STYLES_IMAGE_CONTAINER = css`
width: 100%;
height: 100%;
min-height: 60%;
overflow: hidden;
display: flex;
align-items: center;
`;
const STYLES_TEXT_BOX = css`
max-height: 40%;
padding: 16px;
color: ${Constants.system.black};
`;
const STYLES_NAME = css`
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1; /* number of lines to show */
-webkit-box-orient: vertical;
margin-bottom: 4px;
color: ${Constants.system.black};
`;
const STYLES_BODY = css`
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3; /* number of lines to show */
-webkit-box-orient: vertical;
margin-bottom: 8px;
color: ${Constants.system.textGrayDark};
`;
export default function LinkCard({ file }) {
const url = file.url;
const link = file.data.link;
const { image, name, body } = link;
return (
e.stopPropagation()}>