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
Notification.js
29 lines
| 1 | import { Button } from '@wordpress/components'; |
| 2 | |
| 3 | const Notification = ( { editor, data } ) => { |
| 4 | const { text, cta, url } = data; |
| 5 | |
| 6 | const UpsellNotification = () => { |
| 7 | return ( |
| 8 | <div className="notification"> |
| 9 | <p>{ text }</p> |
| 10 | { url && cta && ( |
| 11 | <Button |
| 12 | target="_blank" |
| 13 | isSecondary |
| 14 | href={ url |
| 15 | .replace( '<builder_name>', editor ) |
| 16 | .replace( ' ', '' ) } |
| 17 | > |
| 18 | { cta } |
| 19 | </Button> |
| 20 | ) } |
| 21 | </div> |
| 22 | ); |
| 23 | }; |
| 24 | |
| 25 | return <UpsellNotification />; |
| 26 | }; |
| 27 | |
| 28 | export default Notification; |
| 29 |