-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use callouts info styling for enablements * Apply Prettier formatting * Move href out of the header * Apply Prettier formatting
- Loading branch information
1 parent
1f29de4
commit 80f1f6d
Showing
1 changed file
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import React from "react" | ||
import React from 'react'; | ||
import { Callout } from '@pantheon-systems/pds-toolkit-react'; | ||
import './style.css'; | ||
|
||
const Enablement = ({ title, link, campaign, children }) => { | ||
|
||
function _handleClick() { | ||
if (window.analytics){ | ||
window.analytics.track("Docs Enablement Clicked", { | ||
campaign: {campaign}, | ||
if (window.analytics) { | ||
window.analytics.track('Docs Enablement Clicked', { | ||
campaign: { campaign }, | ||
}); | ||
} | ||
} | ||
return ( | ||
<div className="enablement"> | ||
<h4 className="info"> | ||
<a href={link} className="external" onClick={_handleClick}>{title}</a> | ||
</h4> | ||
{children} | ||
</div> | ||
) | ||
} | ||
<Callout children={children} type="info" className="docs-alert"> | ||
<h4>{title}</h4> | ||
{children}{' '} | ||
<a href={link} onClick={_handleClick}> | ||
Learn more | ||
</a> | ||
</Callout> | ||
); | ||
}; | ||
|
||
export default Enablement | ||
export default Enablement; |