PluginProbe
Extendify / 2.2.0
Extendify v2.2.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 / PostEditor.jsx

PostEditor.jsx in Extendify 2.2.0, at src/HelpCenter/components/buttons/PostEditor.jsx

32 lines 969 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Button } from '@wordpress/components';
2 import { __, isRTL } from '@wordpress/i18n';
3 import { helpFilled, Icon } 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 PostEditor = () => {
9 const { setVisibility } = useGlobalSyncStore();
10 const { incrementActivity } = useActivityStore();
11 return (
12 <Button
13 className="is-compact ml-1 hidden gap-1 px-2 md:visible md:inline-flex xl:px-3"
14 data-test="help-center-editor-page-button"
15 onClick={() => {
16 setVisibility('open');
17 incrementActivity('hc-editor-page-button');
18 }}
19 variant="primary">
20 <span className="hidden xl:inline">{__('Help', 'extendify-local')}</span>
21 <Icon
22 icon={helpFilled}
23 width={18}
24 height={18}
25 className={classNames('fill-design-text', {
26 'scale-x-[-1]': isRTL(),
27 })}
28 />
29 </Button>
30 );
31 };
32