UNPKG

ideaz-element

Version:

<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>

19 lines (18 loc) 884 B
import { ref as o, computed as a } from "vue"; import { useLocale as r } from "../../../../hooks/useLocale.mjs"; function d(n) { const c = o(!1), e = o(!1), { t } = r(), l = o(t("common.confirm")), i = o(t("common.cancel")), m = a(() => ({ ...n.confirmButtonProps, label: n.extend ? l.value : n.confirmButtonLabel || n.confirmButtonProps.label || t("common.confirm"), loading: n.extend ? c.value : n.confirmButtonLoading || n.confirmButtonProps.loading })), u = a(() => ({ ...n.cancelButtonProps, label: n.extend ? i.value : n.cancelButtonLabel || n.cancelButtonProps.label || t("common.cancel"), loading: n.extend ? e.value : n.cancelButtonLoading || n.cancelButtonProps.loading })); return { confirmBtnProps: m, cancelBtnProps: u, isConfirmBtnLoading: c, isCancelBtnLoading: e }; } export { d as useButton }; //# sourceMappingURL=useButton.mjs.map