import { Box, Card, Inline, Link, Skeleton, SkeletonLines, Stack, Text, useContainerSize, } from "@front10/base-elements"; import clsx from "clsx"; import * as React from "react"; import { SingleCardProps } from "./CardProps"; import { YouTubeVidePreview } from "./_commons/atoms/YoutubeVideoPreview"; import { ellipsis } from "polished"; function YoutubeA( { data: { image, imageAltText = "", //likes count text1, //comment counts text2, //caption text text3, link, // title text5, // views count text6, // created text7, // video duration, text8, } = {}, showText1 = true, showText2 = false, showText3 = true, imageCover = "cover", onCardClick, onCallToActionClick, tabIndex, className, isLoading, ...props }: SingleCardProps, ref: React.Ref ) { const cardWidth = useContainerSize(ref as any); return ( ({ "&:hover": { ".fr-youtube-svg": { opacity: 1, }, ".fr-title-content": { textDecoration: "underline", }, }, ...theme.layout?.cardContainer, })} className={clsx("wx-card", className)} > 180} showTime={cardWidth > 150} alt={imageAltText} url={link} image={image} time={text8} /> {cardWidth > 150 && ( {isLoading ? : text5} {isLoading ? : text7} {isLoading ? : text3} {cardWidth > 200 && ( {isLoading ? ( ) : ( <> {text6} Views {text1} Likes {text2} Comments )} )} )} ); } const YoutubeAWithRef = React.forwardRef(YoutubeA); export { YoutubeAWithRef as YoutubeA };