PluginProbe
Extendify / trunk
Extendify vtrunk
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 / PostEditor.jsx

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

33 lines 972 B
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 { Button } from '@wordpress/components';
4 import { __, isRTL } from '@wordpress/i18n';
5 import { helpFilled, Icon } from '@wordpress/icons';
6 import classNames from 'classnames';
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 >
21 <span className="hidden xl:inline">{__('Help', 'extendify-local')}</span>
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