PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
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 / Agent / workflows / abilities / components / run / Generic.jsx

Generic.jsx in Extendify 3.2.1, at src/Agent/workflows/abilities/components/run/Generic.jsx

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 export const Generic = ({ inputs, onConfirm, onCancel }) => {
4 const run = () => onConfirm?.({ data: inputs ?? {} });
5
6 return (
7 <div className="mb-4 ms-2 me-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50">
8 <div className="rounded-lg border-b border-gray-300 bg-white p-3">
9 <p className="m-0 p-0 text-sm text-gray-900">
10 {
11 // translators: confirm prompt before the agent performs a WordPress task it picked.
12 __('Run this action?', 'extendify-local')
13 }
14 </p>
15 </div>
16 <div className="flex justify-start gap-2 p-3">
17 <button
18 type="button"
19 className="w-full rounded-sm border border-gray-500 bg-white p-2 text-sm text-gray-900"
20 onClick={onCancel}
21 >
22 {__('Cancel', 'extendify-local')}
23 </button>
24 <button
25 type="button"
26 className="w-full rounded-sm border border-design-main bg-design-main p-2 text-sm text-white"
27 onClick={run}
28 >
29 {__('Confirm', 'extendify-local')}
30 </button>
31 </div>
32 </div>
33 );
34 };
35