ADD duration overlay to VideoCard
This commit is contained in:
@@ -27,6 +27,7 @@ const VideoCard = ({
|
|||||||
return (
|
return (
|
||||||
<Link to={videoPath}>
|
<Link to={videoPath}>
|
||||||
<div className={clsx("flex flex-col", className)}>
|
<div className={clsx("flex flex-col", className)}>
|
||||||
|
<div className={"relative inline-block"}>
|
||||||
<img
|
<img
|
||||||
src={imgSrc}
|
src={imgSrc}
|
||||||
alt="Video Thumbnail"
|
alt="Video Thumbnail"
|
||||||
@@ -37,9 +38,26 @@ const VideoCard = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<p className="
|
||||||
|
absolute
|
||||||
|
top-2
|
||||||
|
left-2
|
||||||
|
bg-black bg-opacity-60
|
||||||
|
text-white
|
||||||
|
px-2
|
||||||
|
py-1
|
||||||
|
rounded
|
||||||
|
pointer-events-none
|
||||||
|
text-sm
|
||||||
|
z-1
|
||||||
|
">
|
||||||
|
{formatTime(duration)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className={"flex flex-row justify-between items-center p-2"}>
|
<div className={"flex flex-row justify-between items-center p-2"}>
|
||||||
<p>{title}</p>
|
<p>{title == "" ? "(No Title)" : title}</p>
|
||||||
<p>{formatTime(duration)}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const MyClips = () => {
|
|||||||
duration={clip.duration}
|
duration={clip.duration}
|
||||||
thumbnailPath={clip.thumbnailPath}
|
thumbnailPath={clip.thumbnailPath}
|
||||||
videoPath={clip.videoPath}
|
videoPath={clip.videoPath}
|
||||||
className={"w-40 p-5"}
|
className={"w-40 m-5"}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user