PluginProbe
Extendify / 1.9.0
Extendify v1.9.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 / Draft / components / DraftMenu.js

DraftMenu.js in Extendify 1.9.0, at src/Draft/components/DraftMenu.js

109 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { MenuGroup, MenuItem } from '@wordpress/components'
2 import { __ } from '@wordpress/i18n'
3 import { Icon } from '@wordpress/icons'
4 import { pencil } from '@draft/svg'
5
6 export const DraftMenu = ({ disabled, setInputText, setReady }) => {
7 const handleClick = (inputText) => {
8 setInputText(inputText)
9 setReady(false)
10 }
11
12 return (
13 <MenuGroup>
14 <MenuItem
15 disabled={disabled}
16 onClick={() =>
17 handleClick(
18 __('Write a blog post about', 'extendify') + ' ',
19 )
20 }
21 className="group">
22 <Icon
23 icon={pencil}
24 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
25 />
26 <span className="whitespace-normal text-left">
27 {__('Blog post…', 'extendify')}
28 </span>
29 </MenuItem>
30 <MenuItem
31 disabled={disabled}
32 onClick={() =>
33 handleClick(__('Write an outline for', 'extendify') + ' ')
34 }
35 className="group">
36 <Icon
37 icon={pencil}
38 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
39 />
40 <span className="whitespace-normal text-left">
41 {__('Outline…', 'extendify')}
42 </span>
43 </MenuItem>
44 <MenuItem
45 disabled={disabled}
46 onClick={() =>
47 handleClick(__('Write a poem about', 'extendify') + ' ')
48 }
49 className="group">
50 <Icon
51 icon={pencil}
52 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
53 />
54 <span className="whitespace-normal text-left">
55 {__('Poem…', 'extendify')}
56 </span>
57 </MenuItem>
58 <MenuItem
59 disabled={disabled}
60 onClick={() =>
61 handleClick(
62 __('Write a press release for', 'extendify') + ' ',
63 )
64 }
65 className="group">
66 <Icon
67 icon={pencil}
68 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
69 />
70 <span className="whitespace-normal text-left">
71 {__('Press release…', 'extendify')}
72 </span>
73 </MenuItem>
74 <MenuItem
75 disabled={disabled}
76 onClick={() =>
77 handleClick(
78 __('Write a pros and cons list for', 'extendify') + ' ',
79 )
80 }
81 className="group">
82 <Icon
83 icon={pencil}
84 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
85 />
86 <span className="whitespace-normal text-left">
87 {__('Pros and cons list…', 'extendify')}
88 </span>
89 </MenuItem>
90 <MenuItem
91 disabled={disabled}
92 onClick={() =>
93 handleClick(
94 __('Write a job description for', 'extendify') + ' ',
95 )
96 }
97 className="group">
98 <Icon
99 icon={pencil}
100 className="flex-shrink-0 group-hover:text-current text-design-main fill-current w-5 h-5 mr-2"
101 />
102 <span className="whitespace-normal text-left">
103 {__('Job description…', 'extendify')}
104 </span>
105 </MenuItem>
106 </MenuGroup>
107 )
108 }
109