diff --git a/src/components/ActionBar/ActionBar.js b/src/components/ActionBar/ActionBar.js index 89fd898dc..82202ab4c 100644 --- a/src/components/ActionBar/ActionBar.js +++ b/src/components/ActionBar/ActionBar.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { cx } from '@leafygreen-ui/emotion'; import Icon from '@leafygreen-ui/icon'; import { Overline } from '@leafygreen-ui/typography'; +import { useDarkMode } from '@leafygreen-ui/leafygreen-provider'; import { useSiteMetadata } from '../../hooks/use-site-metadata'; import { isBrowser } from '../../utils/is-browser'; import { getPlaintext } from '../../utils/get-plaintext'; @@ -37,6 +38,7 @@ export const DEPRECATED_PROJECTS = ['atlas-app-services', 'datalake', 'realm']; const ActionBar = ({ template, slug, sidenav, ...props }) => { const url = isBrowser ? window.location.href : null; const metadata = useSnootyMetadata(); + const { darkMode } = useDarkMode(); const { snootyEnv } = useSiteMetadata(); const feedbackData = useFeedbackData({ slug, @@ -71,8 +73,8 @@ const ActionBar = ({ template, slug, sidenav, ...props }) => { {template !== 'openapi' && } - - + + diff --git a/src/components/ActionBar/SearchInput.js b/src/components/ActionBar/SearchInput.js index c7edb92e6..d4e6e15d5 100644 --- a/src/components/ActionBar/SearchInput.js +++ b/src/components/ActionBar/SearchInput.js @@ -5,7 +5,6 @@ import { useLocation } from '@gatsbyjs/reach-router'; import { css, cx } from '@leafygreen-ui/emotion'; import IconButton from '@leafygreen-ui/icon-button'; import Icon from '@leafygreen-ui/icon'; -// import { useDarkMode } from '@leafygreen-ui/leafygreen-provider'; import { SearchInput as LGSearchInput } from '@leafygreen-ui/search-input'; import { Link } from '@leafygreen-ui/typography'; import { useAllDocsets } from '../../hooks/useAllDocsets'; @@ -19,9 +18,6 @@ import { reportAnalytics } from '../../utils/report-analytics'; import { searchIconStyling, searchInputStyling, StyledInputContainer, StyledSearchBoxRef } from './styles'; import { ShortcutIcon, SparkleIcon } from './SparkIcon'; -// const Chatbot = lazy(() => import('mongodb-chatbot-ui')); -// const SearchMenu = lazy(() => import('./SearchMenu')); - export const PLACEHOLDER_TEXT = `Search MongoDB Docs`; const PLACEHOLDER_TEXT_MOBILE = 'Search';