| 1 |
import { Icon } from '@wordpress/components' |
| 2 |
import { useRef } from '@wordpress/element' |
| 3 |
import { __ } from '@wordpress/i18n' |
| 4 |
import { General } from '@library/api/General' |
| 5 |
import { growthArrow, brandLogo } from '@library/components/icons' |
| 6 |
import { useUserStore } from '@library/state/User' |
| 7 |
import { SplitModal } from './SplitModal' |
| 8 |
|
| 9 |
export const ProModal = () => { |
| 10 |
const initialFocus = useRef(null) |
| 11 |
return ( |
| 12 |
<SplitModal isOpen={true} invertedButtonColor={true} ref={initialFocus}> |
| 13 |
<div> |
| 14 |
<div className="mb-5 flex items-center space-x-2 text-extendify-black"> |
| 15 |
{brandLogo} |
| 16 |
</div> |
| 17 |
<h3 className="mt-0 text-xl"> |
| 18 |
{__( |
| 19 |
'Get unlimited access to all our Pro patterns & layouts', |
| 20 |
'extendify', |
| 21 |
)} |
| 22 |
</h3> |
| 23 |
<p className="text-sm text-black"> |
| 24 |
{__( |
| 25 |
"Upgrade to Extendify Pro and use all the patterns and layouts you'd like, including our exclusive Pro catalog.", |
| 26 |
'extendify', |
| 27 |
)} |
| 28 |
</p> |
| 29 |
<div> |
| 30 |
<a |
| 31 |
target="_blank" |
| 32 |
ref={initialFocus} |
| 33 |
className="button-extendify-main button-focus mt-2 inline-flex justify-center px-4 py-3" |
| 34 |
style={{ minWidth: '225px' }} |
| 35 |
href={`https://extendify.com/pricing/?utm_source=${ |
| 36 |
window.extendifyData.sdk_partner |
| 37 |
}&utm_medium=library&utm_campaign=pro-modal&utm_content=upgrade-now&utm_group=${useUserStore |
| 38 |
.getState() |
| 39 |
.activeTestGroupsUtmValue()}`} |
| 40 |
onClick={async () => |
| 41 |
await General.ping('pro-modal-click') |
| 42 |
} |
| 43 |
rel="noreferrer"> |
| 44 |
{__('Upgrade Now', 'extendify')} |
| 45 |
<Icon icon={growthArrow} size={24} className="-mr-1" /> |
| 46 |
</a> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
<div className="justify-endrounded-tr-sm flex w-full rounded-br-sm bg-black"> |
| 50 |
<img |
| 51 |
alt={__('Upgrade Now', 'extendify')} |
| 52 |
className="max-w-full rounded-tr-sm rounded-br-sm" |
| 53 |
src={ |
| 54 |
window.extendifyData.asset_path + |
| 55 |
'/modal-extendify-black.png' |
| 56 |
} |
| 57 |
/> |
| 58 |
</div> |
| 59 |
</SplitModal> |
| 60 |
) |
| 61 |
} |
| 62 |
|