Skip to content

Commit

Permalink
File Block: Add an example preview (#32350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jun 2, 2021
1 parent cba8fec commit ad77257
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/block-library/src/file/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { _x } from '@wordpress/i18n';
import { file as icon } from '@wordpress/icons';

/**
Expand All @@ -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,
Expand Down

0 comments on commit ad77257

Please sign in to comment.