Add components for Act management and integrate Electron setup

This commit is contained in:
natreex
2025-11-16 11:00:04 -05:00
parent e192b6dcc2
commit 8167948881
97 changed files with 25378 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
import React from "react";
type ButtonType = 'alert' | 'danger' | 'informatif' | 'success';
interface ConfirmButtonProps {
text: string;
callBackFunction?: () => void;
buttonType?: ButtonType;
}
export default function ConfirmButton(
{
text,
callBackFunction,
buttonType = 'success'
}: ConfirmButtonProps) {
function getButtonType(alertType: ButtonType): string {
switch (alertType) {
case 'alert':
return 'bg-warning';
case 'danger':
return 'bg-error';
case 'informatif':
return 'bg-info';
case 'success':
default:
return 'bg-success';
}
}
const applyType: string = getButtonType(buttonType);
return (
<button
onClick={callBackFunction}
className={`rounded-lg ${applyType} px-5 py-2.5 text-white font-semibold shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-4 focus:ring-primary/20`}
>
{text}
</button>
)
}