@octopusdeploy/design-system-components
Version:
The design systems component library.
9 lines (8 loc) • 413 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useIsBusy = useIsBusy;
const useIsPromisePending_1 = require("./useIsPromisePending");
function useIsBusy(busyState) {
const isBusyFromPromise = (0, useIsPromisePending_1.useIsPromisePending)(busyState instanceof Promise ? busyState : undefined);
return typeof busyState === "boolean" ? busyState : isBusyFromPromise;
}