@wordpress/block-library
Version:
Block library for the WordPress editor.
41 lines (40 loc) • 1.51 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_i18n = require("@wordpress/i18n");
let _wordpress_icons = require("@wordpress/icons");
let __dynamic_source_js = require("./dynamic-source.cjs");
let __shared_js = require("./shared.cjs");
// packages/block-library/src/gallery/variations.js
const variations = [
{
name: "dynamic-gallery",
title: (0, _wordpress_i18n.__)("Dynamic Gallery"),
description: (0, _wordpress_i18n.__)("Display images from a source, such as those attached to the current post."),
attributes: { dynamicContent: { source: __dynamic_source_js.ATTACHED_MEDIA } },
isActive: (blockAttributes) => !!blockAttributes.dynamicContent,
scope: []
},
{
name: "gallery-flex",
title: (0, _wordpress_i18n.__)("Gallery"),
description: (0, _wordpress_i18n.__)("Arrange images in flexible rows."),
icon: _wordpress_icons.gallery,
attributes: { layout: { type: "flex" } },
isActive: (blockAttributes) => (0, __shared_js.isGalleryFlexLayout)(blockAttributes.layout),
scope: ["transform"]
},
{
name: "gallery-grid",
title: (0, _wordpress_i18n.__)("Gallery Grid"),
description: (0, _wordpress_i18n.__)("Arrange images in a grid."),
icon: _wordpress_icons.grid,
attributes: { layout: { type: "grid" } },
isActive: (blockAttributes) => blockAttributes.layout?.type === "grid",
scope: ["transform"]
}
];
exports.default = variations;
//# sourceMappingURL=variations.cjs.map