import { Box, Card, Inline, Link, Stack, Text, useContainerSize, } from "@front10/base-elements"; import clsx from "clsx"; import { ellipsis } from "polished"; import * as React from "react"; import { SingleCardProps } from "./CardProps"; import { YouTubeVidePreview } from "./_commons/atoms/YoutubeVideoPreview"; function YoutubeB( { 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 ( ({ position: "relative", "&:hover": { ".fr-title-content": { textDecoration: "underline", }, ".fr-card-body": { opacity: "0.95", visibility: "visible", transition: "opacity .3s ease", }, }, color: "var(--wx-card-text-color, #000)", ...theme.layout?.cardContainer, })} className={clsx("wx-card", className)} > 190} showTime={cardWidth > 150} alt={imageAltText} url={link} image={image} time={text8} /> {cardWidth > 190 && !isLoading ? ( {text5} {text7} {cardWidth > 250 && ( {text3} )} {text6} Views {text1} Likes {text2} Comments ) : null} ); } const YoutubeBWithRef = React.forwardRef(YoutubeB); export { YoutubeBWithRef as YoutubeB };