diff --git a/www/src/components/LeaveFeedback.scss b/www/src/components/LeaveFeedback.scss deleted file mode 100644 index 0e466380d00..00000000000 --- a/www/src/components/LeaveFeedback.scss +++ /dev/null @@ -1,13 +0,0 @@ -.pgn__docs-page-feedback-link.nav-link { - color: $gray-400; - font-size: $font-size-sm; - line-height: $micro-line-height; - padding-left: 0; - padding-top: 0; - margin-bottom: map-get($spacers, 5); - display: inline-block; - - &:hover { - text-decoration: $link-hover-decoration; - } -} diff --git a/www/src/components/LeaveFeedback.tsx b/www/src/components/LeaveFeedback.tsx index 138c9589e52..aa08e0cff4d 100644 --- a/www/src/components/LeaveFeedback.tsx +++ b/www/src/components/LeaveFeedback.tsx @@ -1,29 +1,56 @@ -import React from 'react'; +import React, { AnchorHTMLAttributes } from 'react'; import PropTypes from 'prop-types'; -import { Nav } from '~paragon-react'; +import { Nav, Button, Hyperlink } from '~paragon-react'; import { useLocation } from '@reach/router'; -function LeaveFeedback(props) { +export interface LeaveFeedbackProps extends Partial> { + isNavLink?: boolean; +} + +function LeaveFeedback({ isNavLink, ...props }: LeaveFeedbackProps) { const location = useLocation(); const FEEDBACK_URL = `https://github.com/openedx/paragon/issues/new?title=%5Bparagon-openedx.netlify.app%5D%20Feedback%20(on%20${location.pathname})&labels=docs&template=feedback_template.md`; + const leaveFeedbackLinkTitle = 'Leave feedback'; const handleLinkFeedbackClick = () => { global.analytics.track('openedx.paragon.docs.leave_feedback.clicked'); }; + if (isNavLink) { + return ( + + {leaveFeedbackLinkTitle} + + ); + } + return ( - - Leave feedback - + ); } LeaveFeedback.propTypes = { - className: PropTypes.string, + isNavLink: PropTypes.bool, }; LeaveFeedback.defaultProps = { - className: 'muted-link', + isNavLink: false, }; export default LeaveFeedback; diff --git a/www/src/components/PageLayout.tsx b/www/src/components/PageLayout.tsx index 45dd7c61c1b..3b5cf02ffe7 100644 --- a/www/src/components/PageLayout.tsx +++ b/www/src/components/PageLayout.tsx @@ -83,7 +83,7 @@ function Layout({ {children}
- +
Code of Conduct - + Open edX - +
- + Deploys by Netlify - +
diff --git a/www/src/scss/base.scss b/www/src/scss/base.scss index d044fd7224e..913b13f76d0 100644 --- a/www/src/scss/base.scss +++ b/www/src/scss/base.scss @@ -2,7 +2,6 @@ @import "../components/LinkedHeading"; @import "../components/Menu"; @import "../components/doc-elements"; -@import "../components/LeaveFeedback"; @import "../components/Settings"; @import "../components/Toc"; @import "../components/header/Header"; diff --git a/www/src/templates/component-page-template.tsx b/www/src/templates/component-page-template.tsx index 8758f285684..a665942699e 100644 --- a/www/src/templates/component-page-template.tsx +++ b/www/src/templates/component-page-template.tsx @@ -18,6 +18,7 @@ import Layout from '../components/PageLayout'; import SEO from '../components/SEO'; import LinkedHeading from '../components/LinkedHeading'; import ComponentsUsage from '../components/insights/ComponentsUsage'; +import LeaveFeedback from '../components/LeaveFeedback'; export interface IPageTemplate { data: { @@ -136,7 +137,10 @@ export default function PageTemplate({

{mdx.frontmatter.notes}

)} -

{mdx.frontmatter.title}

+
+

{mdx.frontmatter.title}

+ +
{mdx.body}