PluginProbe ʕ •ᴥ•ʔ
Starter Sites & Templates by Neve / trunk
Starter Sites & Templates by Neve vtrunk
1.4.0 1.3.0 1.2.29 1.2.28 1.2.6 1.2.7 1.2.8 1.2.9 trunk 1.0.10 1.0.11 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.20 1.1.21 1.1.22 1.1.23 1.1.24 1.1.25 1.1.26 1.1.27 1.1.28 1.1.29 1.1.3 1.1.30 1.1.31 1.1.32 1.1.33 1.1.34 1.1.35 1.1.36 1.1.37 1.1.38 1.1.39 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.3 1.2.4 1.2.5
templates-patterns-collection / assets / src / Components / NewTCNotice.js
templates-patterns-collection / assets / src / Components Last commit date
CloudLibrary 1 year ago Settings 1 year ago StarterSites 3 years ago App.js 2 years ago Card.js 3 years ago CategoriesTabs.js 3 years ago CategorySelector.js 2 years ago CustomTooltip.js 3 years ago DocNotice.js 2 years ago EditorSelector.js 2 years ago EditorTabs.js 4 years ago Header.js 2 years ago Icon.js 2 years ago ImportModal.js 1 year ago ImportModalError.js 2 years ago ImportModalMock.js 4 years ago ImportModalNote.js 4 years ago ImportStepper.js 1 year ago InstallModal.js 1 year ago License.js 2 years ago LicensePanelContext.js 3 years ago Loading.js 4 years ago Main.js 1 year ago Migration.js 4 years ago NewTCNotice.js 1 year ago Notification.js 4 years ago OnboardingContent.js 4 years ago PreviewFrame.js 3 years ago Search.js 2 years ago StarterSiteCard.js 3 years ago
NewTCNotice.js
55 lines
1 import {__} from '@wordpress/i18n';
2 import {Button} from '@wordpress/components';
3 import {close} from '@wordpress/icons';
4 import {useState} from '@wordpress/element';
5 import {ajaxAction} from '../utils/rest';
6
7 export default function () {
8 const [isVisible, setIsVisible] = useState(true);
9
10 const {
11 show,
12 ajaxURL,
13 nonce
14 } = window.tiobDash.newTCNotice;
15
16 const dismissNotice = () => {
17 ajaxAction(
18 ajaxURL,
19 'dismiss_new_tc_notice',
20 nonce
21 ).then( (r) => {
22 console.log(r);
23 setIsVisible(false);
24 } ).catch(e => {
25 console.error(e);
26 } );
27 };
28
29 if (!show || ! isVisible) {
30 return null;
31 }
32
33 return (
34 <div className="tiob-new-tc-notice">
35 <div>
36 <p>
37 {__('We\'ve launched a dedicated Templates Cloud plugin that offers advanced permission controls and additional features. Try it out from your Themeisle account.', 'templates-patterns-collection')}
38 </p>
39
40 <p className="description">
41 {__('If you already have templates saved in the cloud, you can still use them in this plugin.', 'templates-patterns-collection')}
42 </p>
43 </div>
44
45 <Button
46 size="compact"
47 className="dismiss"
48 icon={close}
49 iconSize={20}
50 label={__('Dismiss', 'templates-patterns-collection')}
51 onClick={dismissNotice}
52 />
53 </div>
54 );
55 }