PluginProbe
Extendify / 3.1.0
Extendify v3.1.0
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 0.7.0 All 126 releases
extendify / src / HelpCenter / components / buttons / AdminBar.jsx

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

34 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useGlobalSyncStore } from '@help-center/state/globals-sync';
2 import { useActivityStore } from '@shared/state/activity';
3 import { Icon } from '@wordpress/components';
4 import { __, isRTL } from '@wordpress/i18n';
5 import { helpFilled } from '@wordpress/icons';
6 import classNames from 'classnames';
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 items-center justify-center gap-1 rounded-xs border-0 bg-wp-theme-main px-2 leading-extra-tight text-white ring-offset-1 ring-offset-wp-theme-bg focus:outline-hidden focus:ring-wp focus:ring-wp-theme-main"
21 >
22 {__('Help', 'extendify-local')}
23 <Icon
24 icon={helpFilled}
25 width={18}
26 height={18}
27 className={classNames('fill-design-text', {
28 'scale-x-[-1]': isRTL(),
29 })}
30 />
31 </button>
32 );
33 };
34