| 1 |
import React from "react"; |
| 2 |
import { __ } from "@wordpress/i18n"; |
| 3 |
import { PopupVideo } from "./PopupVideo" |
| 4 |
import { useState } from "react"; |
| 5 |
|
| 6 |
const Video = () => { |
| 7 |
|
| 8 |
const [isOpen, setIsOpen] = useState(false); |
| 9 |
|
| 10 |
const openPopup = () => setIsOpen(true); |
| 11 |
const closePopup = () => setIsOpen(false); |
| 12 |
|
| 13 |
return ( |
| 14 |
<> |
| 15 |
<div className="betterdocs-video-section"> |
| 16 |
<div className="betterdocs-row"> |
| 17 |
<div className="betterdocs-overview-col betterdocs-content-left betterdocs-col-6 "> |
| 18 |
<h2 className="betterdocs-section-title">{__("Welcome To BetterDocs", "betterdocs")}</h2> |
| 19 |
<p className="betterdocs-section-sub-title"><span className="betterdocs-bold-title">{__("40,000+ businesses", "betterdocs")} </span> |
| 20 |
{__("are accelerating their growth by creating content-rich documentation and knowledge base with BetterDocs.","betterdocs")} |
| 21 |
</p> |
| 22 |
<a href="https://www.youtube.com/watch?v=pwT6WMM7vRY&list=PLWHp1xKHCfxDOGyziODrJ1qYNOC8pbVYA" className="betterdocs-video-button"> |
| 23 |
<span> |
| 24 |
<svg |
| 25 |
width="20" |
| 26 |
height="20" |
| 27 |
viewBox="0 0 20 20" |
| 28 |
fill="none" |
| 29 |
xmlns="http://www.w3.org/2000/svg" |
| 30 |
> |
| 31 |
<g clipPath="url(#clip0_11564_17895)"> |
| 32 |
<path |
| 33 |
d="M5 3.33357V16.6669C4.99996 16.8152 5.03948 16.9608 5.11448 17.0887C5.18949 17.2166 5.29726 17.3222 5.42669 17.3945C5.55611 17.4669 5.70249 17.5034 5.85074 17.5003C5.99898 17.4972 6.14371 17.4546 6.27 17.3769L17.1033 10.7102C17.2247 10.6357 17.3249 10.5313 17.3944 10.407C17.4639 10.2827 17.5004 10.1426 17.5004 10.0002C17.5004 9.85783 17.4639 9.71779 17.3944 9.5935C17.3249 9.4692 17.2247 9.36479 17.1033 9.29024L6.27 2.62357C6.14371 2.54587 5.99898 2.50328 5.85074 2.50018C5.70249 2.49709 5.55611 2.5336 5.42669 2.60595C5.29726 2.67831 5.18949 2.78388 5.11448 2.91179C5.03948 3.03969 4.99996 3.18529 5 3.33357Z" |
| 34 |
fill="#00B884" |
| 35 |
/> |
| 36 |
</g> |
| 37 |
<defs> |
| 38 |
<clipPath id="clip0_11564_17895"> |
| 39 |
<rect width="20" height="20" fill="white" /> |
| 40 |
</clipPath> |
| 41 |
</defs> |
| 42 |
</svg> |
| 43 |
</span> |
| 44 |
<span>{__("Watch Tutorials", "betterdocs")}</span> |
| 45 |
</a> |
| 46 |
</div> |
| 47 |
<div className="betterdocs-overview-col betterdocs-content-right betterdocs-col-6 "> |
| 48 |
<div className="popup-trigger" onClick={openPopup}> |
| 49 |
<img src={`${betterdocs_admin.dir_url}assets/static/admin/images/videoThumb.png`} /> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
|
| 54 |
{isOpen && ( |
| 55 |
<div className="betterdocs-popup-overlay" onClick={closePopup}> |
| 56 |
<div |
| 57 |
className="betterdocs-popup-wrapper" |
| 58 |
onClick={(e) => e.stopPropagation()} |
| 59 |
> |
| 60 |
<PopupVideo closePopup={closePopup} /> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
)} |
| 64 |
|
| 65 |
</div> |
| 66 |
</> |
| 67 |
); |
| 68 |
}; |
| 69 |
|
| 70 |
export default Video; |
| 71 |
|