react-photoswipe-gallery
Version:
React component wrapper around PhotoSwipe
22 lines • 712 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useGallery = void 0;
var react_1 = __importDefault(require("react"));
var context_1 = require("./context");
/**
* A hook that gives you access to provided methods for more advanced usage
*/
var useGallery = function () {
var open = react_1.default.useContext(context_1.Context).open;
return {
/**
* Function that opens the gallery at the provided index
*/
open: open,
};
};
exports.useGallery = useGallery;
//# sourceMappingURL=hooks.js.map
;