diff --git a/packages/documentation-framework/components/themeSelector/themeSelector.js b/packages/documentation-framework/components/themeSelector/themeSelector.js index 39f9166922..d57de7f333 100644 --- a/packages/documentation-framework/components/themeSelector/themeSelector.js +++ b/packages/documentation-framework/components/themeSelector/themeSelector.js @@ -10,8 +10,12 @@ import { ToggleGroup, ToggleGroupItem, Icon, - Divider + Divider, + Label, + Popover, + Button } from '@patternfly/react-core'; +import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons'; import { useTheme, THEME_TYPES } from '../../hooks/useTheme'; const SunIcon = ( @@ -45,6 +49,47 @@ const DesktopIcon = ( ); +const ColorSchemeGroupLabel = () => { + return ( +
+ Color scheme +
+ ); +}; + +const HighContrastGroupLabel = () => { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + return ( +
+ High contrast{' '} + e.stopPropagation()} + headerContent={"Under development"} + headerComponent="h1" + bodyContent={ + "We are still working to add high contrast support across all PatternFly components and extensions. This beta allows you to preview our progress." + } + footerContent={ + + } + aria-label="More info about high contrast" + appendTo={() => document.body} + > +
+ ) +}; + export const ThemeSelector = ({ id }) => { const { mode: themeMode, setMode: setThemeMode, modes: colorModes } = useTheme(THEME_TYPES.COLOR); const { @@ -109,8 +154,8 @@ export const ThemeSelector = ({ id }) => { preventOverflow: true }} > - - + + System @@ -124,7 +169,7 @@ export const ThemeSelector = ({ id }) => { {process.env.hasHighContrastSwitcher && (<> - + diff --git a/packages/documentation-site/patternfly-docs/patternfly-docs.config.js b/packages/documentation-site/patternfly-docs/patternfly-docs.config.js index 19eb0c0809..b1f7f77705 100644 --- a/packages/documentation-site/patternfly-docs/patternfly-docs.config.js +++ b/packages/documentation-site/patternfly-docs/patternfly-docs.config.js @@ -31,7 +31,7 @@ if (process.env.EXTENSIONS_ONLY === 'true') { hasDesignGuidelines: true, hasThemeSwitcher: true, hasFeedbackButton: true, - hasHighContrastSwitcher: false, + hasHighContrastSwitcher: true, componentsData, sideNavItems: [ { section: 'get-started' },