PluginProbe
Extendify / 3.0.4
Extendify v3.0.4
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 / cards / GenericCard.jsx

GenericCard.jsx in Extendify 3.0.4, at src/Assist/components/dashboard/cards/GenericCard.jsx

38 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { ActionButton } from '@assist/components/dashboard/buttons/ActionButton';
2 import { DismissButton } from '@assist/components/dashboard/buttons/DismissButton';
3 import { useTasksStore } from '@assist/state/tasks';
4
5 export const GenericCard = ({ task }) => {
6 const { isCompleted, dismissTask } = useTasksStore();
7
8 return (
9 <div className="h-full justify-center overflow-hidden bg-white/95 text-base">
10 <div className="flex h-full flex-col items-center justify-center gap-5 p-7 text-center md:p-8">
11 {task?.htmlBefore()}
12
13 <div className="flex h-full flex-col items-center justify-center text-center lg:justify-between">
14 <div>
15 {task?.title && (
16 <h2 className="mb-2 text-2xl font-semibold leading-10 md:mt-0 lg:text-2xl">
17 {task.title}
18 </h2>
19 )}
20 {task?.description && (
21 <p className="m-0 text-sm md:text-base">{task.description}</p>
22 )}
23 </div>
24 <div className="cta mt-6 flex flex-wrap items-center text-sm md:gap-3 lg:mt-3">
25 <ActionButton task={task} />
26 {!isCompleted(task.slug) ? (
27 <DismissButton
28 task={task}
29 onClick={() => dismissTask(task.slug)}
30 />
31 ) : null}
32 </div>
33 </div>
34 </div>
35 </div>
36 );
37 };
38