diff --git a/www/src/components/PageEditBtn.tsx b/www/src/components/PageEditBtn.tsx new file mode 100644 index 0000000000..3da0e8dc05 --- /dev/null +++ b/www/src/components/PageEditBtn.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { Button } from '~paragon-react'; + +function PageEditBtn({ ...props }) { + const handlePageEditBtnClick = () => { + global.analytics.track('openedx.paragon.docs.page_edit.clicked'); + // TODO: further development of the CTA will add functionality. + }; + + return ( + + ); +} + +export default PageEditBtn; diff --git a/www/src/templates/component-page-template.tsx b/www/src/templates/component-page-template.tsx index a665942699..5fc2badb5a 100644 --- a/www/src/templates/component-page-template.tsx +++ b/www/src/templates/component-page-template.tsx @@ -9,6 +9,7 @@ import { Alert, breakpoints, useMediaQuery, + Stack, } from '~paragon-react'; import { SettingsContext } from '../context/SettingsContext'; import { DEFAULT_THEME } from '../../theme-config'; @@ -19,6 +20,7 @@ import SEO from '../components/SEO'; import LinkedHeading from '../components/LinkedHeading'; import ComponentsUsage from '../components/insights/ComponentsUsage'; import LeaveFeedback from '../components/LeaveFeedback'; +import PageEditBtn from '../components/PageEditBtn'; export interface IPageTemplate { data: { @@ -139,7 +141,10 @@ export default function PageTemplate({ )}

{mdx.frontmatter.title}

- + + + +
{mdx.body}