fix: tailles des thumbs ne se réduit pas pour ceulleux qui ont une vidéo

proto-module-actu-react
Jalil Arfaoui 2023-09-09 01:20:03 +02:00
parent b61a17f1ca
commit 5982b04bb5
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ interface Props {
width: string; width: string;
height: string; height: string;
onClick: () => void; onClick: () => void;
className?: string;
style?: IframeHTMLAttributes<HTMLIFrameElement>["style"]; style?: IframeHTMLAttributes<HTMLIFrameElement>["style"];
} }
@ -13,6 +14,7 @@ export const EmbeddedYoutube = ({
width, width,
height, height,
onClick, onClick,
className,
style = {}, style = {},
}: Props) => ( }: Props) => (
<div onClick={onClick}> <div onClick={onClick}>
@ -24,6 +26,7 @@ export const EmbeddedYoutube = ({
frameBorder="0" frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowFullScreen allowFullScreen
className={className}
style={{ pointerEvents: "none", ...style }} style={{ pointerEvents: "none", ...style }}
></iframe> ></iframe>
</div> </div>

View File

@ -27,6 +27,7 @@ export const ResistantThumb = ({ resistant }: Props) => {
youtubeId={resistant.video} youtubeId={resistant.video}
width={"200"} width={"200"}
height={"200"} height={"200"}
className="resistant-thumb"
onClick={handleClick} onClick={handleClick}
/> />
); );