Skip to content

Commit

Permalink
Fix enablement styles (#9421)
Browse files Browse the repository at this point in the history
* Use callouts info styling for enablements

* Apply Prettier formatting

* Move href out of the header

* Apply Prettier formatting
  • Loading branch information
rachelwhitton authored Feb 11, 2025
1 parent 1f29de4 commit 80f1f6d
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/components/enablement/index.js
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;

0 comments on commit 80f1f6d

Please sign in to comment.