import {
Box,
Image,
Inline,
Link,
Skeleton,
Stack,
StyleProp,
Text,
} from "@front10/base-elements";
import * as React from "react";
import { FacebookCardProps } from "./FacebookCard";
import FacebookIcon from "./FacebookIcon";
interface Props {
profilePicture?: string;
profileUrl?: string;
username?: string;
objectFit: FacebookCardProps["imageCover"];
isLoading?: boolean;
userVerified?: boolean;
date?: string;
sx?: StyleProp;
hasRightIcon?: boolean;
cardWidth?: number;
}
function Avatar(
props: Pick<
Props,
"profileUrl" | "objectFit" | "profilePicture" | "isLoading"
>
) {
const image = (
);
return (
{image}
);
}
export function FacebookHeader(props: Props) {
const avatar = (
);
const headerText = (
{props.isLoading ? (
<>
>
) : (
<>
{props.username}
{props.date}
>
)}
);
const facebookLinkIcon =
props.hasRightIcon && props.cardWidth && props.cardWidth > 199 ? (
) : null;
return (
{avatar}
{headerText}
{facebookLinkIcon}
);
}