import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faPlus} from "@fortawesome/free-solid-svg-icons";
import React from "react";

interface AddActionButtonProps {
    callBackAction: () => Promise<void>;
}

export default function AddActionButton(
    {
        callBackAction
    }: AddActionButtonProps) {
    return (
        <button
            className={`group p-2 rounded-lg text-muted hover:text-primary hover:bg-primary/10 transition-colors`}
            onClick={callBackAction}>
            <FontAwesomeIcon icon={faPlus} className={'w-5 h-5 transition-transform group-hover:rotate-90'}/>
        </button>
    )
}
