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 / Assist / components / dashboard / buttons / EventButton.jsx

EventButton.jsx in Extendify trunk, at src/Assist/components/dashboard/buttons/EventButton.jsx

19 lines 499 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useTasksStore } from '@assist/state/tasks';
2
3 export const EventButton = ({ task, completed }) => {
4 const { completeTask } = useTasksStore();
5
6 return (
7 <button
8 type="button"
9 className="min-w-24 rounded-xs bg-design-main px-4 py-2.5 text-sm font-medium text-design-text hover:opacity-90"
10 onClick={() => {
11 window.dispatchEvent(task.event);
12 completeTask(task.slug);
13 }}
14 >
15 {completed ? task.buttonLabels.completed : task.buttonLabels.notCompleted}
16 </button>
17 );
18 };
19