PluginProbe
Extendify / 1.17.1
Extendify v1.17.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / HelpCenter / components / buttons / AdminBar.jsx

AdminBar.jsx in Extendify 1.17.1, at src/HelpCenter/components/buttons/AdminBar.jsx

33 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Icon } from '@wordpress/components';
2 import { __, isRTL } from '@wordpress/i18n';
3 import { helpFilled } from '@wordpress/icons';
4 import { useActivityStore } from '@shared/state/activity';
5 import classNames from 'classnames';
6 import { useGlobalSyncStore } from '@help-center/state/globals-sync';
7
8 export const AdminBar = () => {
9 const { setVisibility } = useGlobalSyncStore();
10 const { incrementActivity } = useActivityStore();
11
12 return (
13 <button
14 type="button"
15 data-test="help-center-adminbar-button"
16 onClick={() => {
17 setVisibility('open');
18 incrementActivity('hc-admin-bar-button');
19 }}
20 className="m-1.5 -mt-1 inline-flex h-6 cursor-pointer items-center justify-center gap-1 rounded-sm border-0 bg-wp-theme-main p-1 px-2 leading-extra-tight text-white ring-offset-1 ring-offset-wp-theme-bg focus:outline-none focus:ring-wp focus:ring-wp-theme-main">
21 {__('Help', 'extendify-local')}
22 <Icon
23 icon={helpFilled}
24 width={18}
25 height={18}
26 className={classNames('fill-design-text', {
27 'scale-x-[-1]': isRTL(),
28 })}
29 />
30 </button>
31 );
32 };
33