PluginProbe
Code Snippets / 3.9.6
Code Snippets v3.9.6
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / js / components / common / UpsellDialog.tsx

UpsellDialog.tsx in Code Snippets 3.9.6, at js/components/common/UpsellDialog.tsx

63 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { createInterpolateElement } from '@wordpress/element'
2 import React from 'react'
3 import { __ } from '@wordpress/i18n'
4 import { Modal } from '@wordpress/components'
5 import type { Dispatch, SetStateAction } from 'react'
6
7 export interface UpsellDialogProps {
8 isOpen: boolean
9 setIsOpen: Dispatch<SetStateAction<boolean>>
10 }
11
12 export const UpsellDialog: React.FC<UpsellDialogProps> = ({ isOpen, setIsOpen }) =>
13 isOpen
14 ? <Modal
15 title=""
16 className="code-snippets-upsell-dialog"
17 onRequestClose={() => {
18 setIsOpen(false)
19 }}
20 >
21 <img
22 src={`${window.CODE_SNIPPETS?.urls.plugin}/assets/icon.svg`}
23 alt={__('Code Snippets logo', 'code-snippets')}
24 />
25
26 <h1>
27 {createInterpolateElement(
28 __('Unlock all cloud sync features and many more, with <span>Code Snippets Pro</span>', 'code-snippets'),
29 { span: <span /> }
30 )}
31 </h1>
32
33 <p>
34 {createInterpolateElement(
35 __('With Code Snippets Pro you can connect your WordPress sites to the code snippets cloud platform and be able to <strong>backup, synchronise, collaborate, and deploy</strong> your snippets from one central location.', 'code-snippets'),
36 { strong: <strong /> }
37 )}
38 </p>
39
40 <a
41 href="https://codesnippets.pro/pricing/"
42 className="button button-primary button-large"
43 rel="noreferrer" target="_blank"
44 >
45 {__('Explore Code Snippets Pro', 'code-snippets')}
46 </a>
47
48 <h2>{__("Here's what else you get with Pro:", 'code-snippets')}</h2>
49 <ul>
50 <li>{__('Create, explain and verify snippets with AI', 'code-snippets')}</li>
51 <li>{__('Control when snippets run with Conditions', 'code-snippets')}</li>
52 <li>{__('CSS stylesheet snippets', 'code-snippets')}</li>
53 <li>{__('Minified JavaScript snippets', 'code-snippets')}</li>
54 <li>{__('Editor blocks and Elementor widgets', 'code-snippets')}</li>
55 <li>{__('Cloud sync and backup', 'code-snippets')}</li>
56 <li>{__('Cloud share and deploy', 'code-snippets')}</li>
57 <li>{__('Cloud bundles and teams', 'code-snippets')}</li>
58 <li>{__('WP-CLI commands', 'code-snippets')}</li>
59 <li>{__('And much more!', 'code-snippets')}</li>
60 </ul>
61 </Modal>
62 : null
63