PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0.1
GiveWP – Donation Plugin and Fundraising Platform v4.18.0.1
4.18.0.1 4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 All 258 releases
give / src / Campaigns / resources / admin / components / CampaignDetailsPage / Components / Notices / CampaignNotice.tsx

CampaignNotice.tsx in GiveWP – Donation Plugin and Fundraising Platform 4.18.0.1, at src/Campaigns/resources/admin/components/CampaignDetailsPage/Components/Notices/CampaignNotice.tsx

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import cx from 'classnames';
2 import {ExternalLink} from '@wordpress/components';
3 import {CloseIcon} from '@givewp/campaigns/admin/components/Icons';
4
5 import styles from './Notices.module.scss';
6
7 interface NoticeProps {
8 title: string;
9 description: string;
10 handleDismiss?: () => void
11 type: 'campaignSettings' | 'campaignList' | 'campaignForm';
12 linkText?: string;
13 linkHref?: string;
14 }
15
16 export default ({title, description, type, linkHref, linkText, handleDismiss}: NoticeProps) => (
17 <div className={cx(styles['tooltip'], styles[type])}>
18 {handleDismiss && (
19 <div className={styles['close']} onClick={() => handleDismiss()}>
20 <CloseIcon />
21 </div>
22 )}
23 <div>
24 <h3>
25 {title}
26 </h3>
27 <div className={styles['content']}>
28 {description}
29 </div>
30 </div>
31 {linkText && (
32 <div className={styles['content']}>
33 <ExternalLink href={linkHref}>
34 {linkText}
35 </ExternalLink>
36 </div>
37 )}
38 </div>
39 )
40
41