| 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 inline-flex gap-1" |
| 14 |
data-test="help-center-editor-page-button" |
| 15 |
onClick={() => { |
| 16 |
setVisibility('open'); |
| 17 |
incrementActivity('hc-editor-page-button'); |
| 18 |
}} |
| 19 |
variant="primary"> |
| 20 |
{__('Help', 'extendify-local')} |
| 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 |
|