informe-comercial-alfa/app/m/components/BotonNuevo.js

12 lines
482 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client";
import { useCampo } from "../CampoContext";
// «+ Actividad» / «+ Agendar» ya ligado a una oportunidad o cuenta (abre el alta rápida de la app de campo).
export default function BotonNuevo({ referente, className = "m-acc", children = "Actividad", ico = "+" }) {
const { abrirNuevo } = useCampo();
return (
<button type="button" className={className} onClick={() => abrirNuevo({ ref: referente })}>
<i>{ico}</i>{children}
</button>
);
}