diff --git a/src/components/LLMButtons/CopyForLLM/index.tsx b/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx similarity index 92% rename from src/components/LLMButtons/CopyForLLM/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx index 94dbc578c2..3d59643f46 100644 --- a/src/components/LLMButtons/CopyForLLM/index.tsx +++ b/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx @@ -1,16 +1,17 @@ -import React, { useState } from 'react'; +import type React from 'react'; +import { useState } from 'react'; import styles from '../styles.module.css'; // Custom component for button text function ButtonText({ isLoading, isCopied }: { isLoading: boolean; isCopied: boolean }) { if (isLoading) { - return <>Copying...; + return 'Copying...'; } if (isCopied) { - return <>Copied!; + return 'Copied!'; } - return <>Copy for LLM; + return 'Copy for LLM'; } export default function CopyForLLM() { diff --git a/src/components/LLMButtons/ViewAsMarkdown/index.tsx b/apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx similarity index 100% rename from src/components/LLMButtons/ViewAsMarkdown/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx diff --git a/src/components/LLMButtons/index.tsx b/apify-docs-theme/src/theme/LLMButtons/index.tsx similarity index 100% rename from src/components/LLMButtons/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/index.tsx diff --git a/src/components/LLMButtons/styles.module.css b/apify-docs-theme/src/theme/LLMButtons/styles.module.css similarity index 100% rename from src/components/LLMButtons/styles.module.css rename to apify-docs-theme/src/theme/LLMButtons/styles.module.css diff --git a/apify-docs-theme/src/theme/MDXComponents/index.js b/apify-docs-theme/src/theme/MDXComponents/index.js index dd24cd8770..70e23984c4 100644 --- a/apify-docs-theme/src/theme/MDXComponents/index.js +++ b/apify-docs-theme/src/theme/MDXComponents/index.js @@ -1,5 +1,5 @@ -import LLMButtons from '@site/src/components/LLMButtons'; import Admonition from '@theme/Admonition'; +import LLMButtons from '@theme/LLMButtons'; import MDXA from '@theme/MDXComponents/A'; import MDXCode from '@theme/MDXComponents/Code'; import MDXDetails from '@theme/MDXComponents/Details'; diff --git a/package-lock.json b/package-lock.json index f5ef6ded04..bba74baa27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ }, "apify-docs-theme": { "name": "@apify/docs-theme", - "version": "1.0.198", + "version": "1.0.199", "license": "ISC", "dependencies": { "@apify/docs-search-modal": "^1.2.2", diff --git a/src/theme/DocItem/Content/index.js b/src/theme/DocItem/Content/index.js index 14855855b6..2d773b6f18 100644 --- a/src/theme/DocItem/Content/index.js +++ b/src/theme/DocItem/Content/index.js @@ -2,12 +2,11 @@ import { useDoc } from '@docusaurus/plugin-content-docs/client'; import { useLocation } from '@docusaurus/router'; import { ThemeClassNames } from '@docusaurus/theme-common'; import Heading from '@theme/Heading'; +import LLMButtons from '@theme/LLMButtons'; import MDXContent from '@theme/MDXContent'; import clsx from 'clsx'; import React from 'react'; -import LLMButtons from '../../../components/LLMButtons'; - function useSyntheticTitle() { const { metadata, frontMatter, contentTitle } = useDoc(); const shouldRender = !frontMatter.hide_title && typeof contentTitle === 'undefined'; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 598944479f..f095088fb0 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -6,6 +6,7 @@ "src/**/*.js", "src/**/*.ts", "src/**/*.jsx", - "src/**/*.tsx" + "src/**/*.tsx", + "apify-docs-theme/**/*.tsx" ] }