diff --git a/src/theme/TabItem/index.tsx b/src/theme/TabItem/index.tsx deleted file mode 100644 index 91055fe99b0..00000000000 --- a/src/theme/TabItem/index.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import TabItem from '@theme-original/TabItem'; -import type {WrapperProps} from '@docusaurus/types'; -import styles from './styles.module.css'; - -type Props = WrapperProps; - -// Wrapper for TabItem to hide the tab content visually but keep it in the DOM for scrapers -// uses https://docusaurus.io/docs/swizzling#wrapping -// to wrap the original TabItem component and add a contextual label based on the tab value -export default function TabItemWrapper(props: Props): JSX.Element { - const {hidden, value, ...otherProps} = props; - - // Generate contextual label based on tab value - const getContextLabel = (tabValue: string) => { - if (tabValue === 'on-premises') return 'On premises example:'; - if (tabValue === 'hosted') return 'Hosted example:'; - if (tabValue === 'bootc') return 'Bootc example:'; - // Fallback for other tab values - return `${tabValue} example:`; - }; - - return ( -
-
- {getContextLabel(value)} -
- -
- ); -} diff --git a/src/theme/TabItem/styles.module.css b/src/theme/TabItem/styles.module.css deleted file mode 100644 index ff5e356094a..00000000000 --- a/src/theme/TabItem/styles.module.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Hide content visually but keep it in the DOM for scrapers - * Using clip instead of display:none or visibility:hidden - * This makes content invisible but still accessible to crawlers - */ -.hiddenTabItem, -.contextLabel { - position: absolute !important; - width: 1px !important; - height: 1px !important; - padding: 0 !important; - margin: -1px !important; - overflow: hidden !important; - clip: rect(0, 0, 0, 0) !important; - white-space: nowrap !important; - border: 0 !important; -}