From c593403cfb6ab063b17f969c60be3a87c2a33faf Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Tue, 9 Apr 2024 05:16:00 -0500 Subject: [PATCH] Docusaurus: edit EditThisPage component (#5835) * edit EditThisPage component * update styling of edit this on github link --------- Co-authored-by: Prisma --- src/theme/EditThisPage/index.tsx | 22 ++++++++++++++++++++++ src/theme/EditThisPage/styles.module.scss | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/theme/EditThisPage/index.tsx create mode 100644 src/theme/EditThisPage/styles.module.scss diff --git a/src/theme/EditThisPage/index.tsx b/src/theme/EditThisPage/index.tsx new file mode 100644 index 0000000000..06cc447185 --- /dev/null +++ b/src/theme/EditThisPage/index.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import Translate from '@docusaurus/Translate'; +import { ThemeClassNames } from '@docusaurus/theme-common'; +import Link from '@docusaurus/Link'; +import type { Props } from '@theme/EditThisPage'; +import styles from './styles.module.scss' +import clsx from 'clsx'; + +export default function EditThisPage({ editUrl }: Props): JSX.Element { + return ( + + + Edit this page on GitHub + + + + + + ); +} diff --git a/src/theme/EditThisPage/styles.module.scss b/src/theme/EditThisPage/styles.module.scss new file mode 100644 index 0000000000..faf99ce380 --- /dev/null +++ b/src/theme/EditThisPage/styles.module.scss @@ -0,0 +1,18 @@ +.editLink { + font-size: 0.875rem; + display: flex; + align-items: center; + color: var(--gray-600) !important; + text-decoration: underline; + &:hover { + text-decoration: underline; + color: var(--gray-800) !important; + } +} +:root[data-theme='dark'] { + .editLink { + &:hover { + color: var(--gray-400) !important; + } + } +} \ No newline at end of file