@wordpress/block-library
Version:
Block library for the WordPress editor.
15 lines • 769 B
TypeScript
import type { Block } from '@wordpress/blocks';
type ImageAttributes = Block['attributes'];
/**
* Applies the gallery settings to images added to the gallery.
*
* An image block uploads its own file and sets its own size and link, so the
* gallery settings can only be applied once the attachment loads.
*
* @param images The gallery's image blocks.
* @param mediaById The loaded attachments, by id.
* @param buildImageAttributes Returns the attributes to set on an image block.
*/
export default function useApplyGallerySettings(images: Block[], mediaById: ReadonlyMap<unknown, unknown>, buildImageAttributes: (attributes: ImageAttributes) => ImageAttributes): void;
export {};
//# sourceMappingURL=use-apply-gallery-settings.d.ts.map