UNPKG

@wordpress/block-library

Version:
8 lines (7 loc) 1.43 kB
{ "version": 3, "sources": ["../../../src/cover/edit/cover-placeholder.js"], "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { BlockIcon, MediaPlaceholder } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { cover as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { ALLOWED_MEDIA_TYPES } from '../shared';\n\nexport default function CoverPlaceholder( {\n\tdisableMediaButtons = false,\n\tchildren,\n\tonSelectMedia,\n\tonError,\n\tstyle,\n\ttoggleUseFeaturedImage,\n} ) {\n\treturn (\n\t\t<MediaPlaceholder\n\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\tlabels={ {\n\t\t\t\ttitle: __( 'Cover' ),\n\t\t\t} }\n\t\t\tonSelect={ onSelectMedia }\n\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\tdisableMediaButtons={ disableMediaButtons }\n\t\t\tonToggleFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tonError={ onError }\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t{ children }\n\t\t</MediaPlaceholder>\n\t);\n}\n"], "mappings": ";AAGA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU;AACnB,SAAS,SAAS,YAAY;AAK9B,SAAS,2BAA2B;AAY1B;AAVK,SAAR,iBAAmC;AAAA,EACzC,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAO,oBAAC,aAAU,MAAc;AAAA,MAChC,QAAS;AAAA,QACR,OAAO,GAAI,OAAQ;AAAA,MACpB;AAAA,MACA,UAAW;AAAA,MACX,cAAe;AAAA,MACf;AAAA,MACA,uBAAwB;AAAA,MACxB;AAAA,MACA;AAAA,MAEE;AAAA;AAAA,EACH;AAEF;", "names": [] }