From ad772578bfb1b28d39f677483c1a0ce68b16f775 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 2 Jun 2021 19:25:35 +0400 Subject: [PATCH] File Block: Add an example preview (#32350) --- packages/block-library/src/file/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/block-library/src/file/index.js b/packages/block-library/src/file/index.js index 6dbb7446427bd0..91ca52de9271eb 100644 --- a/packages/block-library/src/file/index.js +++ b/packages/block-library/src/file/index.js @@ -1,6 +1,7 @@ /** * WordPress dependencies */ +import { _x } from '@wordpress/i18n'; import { file as icon } from '@wordpress/icons'; /** @@ -17,6 +18,13 @@ export { metadata, name }; export const settings = { icon, + example: { + attributes: { + href: + 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg', + fileName: _x( 'Armstrong_Small_Step', 'Name of the file' ), + }, + }, transforms, edit, save,