Skip to content

Commit

Permalink
use help-icon package for global nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison-Stavlo committed May 24, 2024
1 parent 23d581e commit 10d2565
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { HelpCenter } from '@automattic/data-stores';
import { HelpIcon } from '@automattic/help-center';
import {
useDispatch as useDataStoreDispatch,
useSelect as useDateStoreSelect,
} from '@wordpress/data';
import { Icon, help } from '@wordpress/icons';
import classnames from 'classnames';
import { useRef } from 'react';
import SidebarMenuItem from '../menu-item';

const HELP_CENTER_STORE = HelpCenter.register();

const SidebarHelpCenter = ( { tooltip, onClick } ) => {
const helpIconRef = useRef();
const helpCenterVisible = useDateStoreSelect(
( select ) => select( HELP_CENTER_STORE ).isHelpCenterShown(),
[]
Expand All @@ -30,7 +32,7 @@ const SidebarHelpCenter = ( { tooltip, onClick } ) => {
} ) }
tooltip={ tooltip }
tooltipPlacement="top"
icon={ <Icon icon={ help } size={ 28 } /> }
icon={ <HelpIcon ref={ helpIconRef } /> }
/>
</>
);
Expand Down

0 comments on commit 10d2565

Please sign in to comment.