Skip to content

Commit 21498ed

Browse files
committed
Add PostFeaturedImage to PrePublishPanel
1 parent d41e10c commit 21498ed

File tree

3 files changed

+4143
-573
lines changed

3 files changed

+4143
-573
lines changed

assets/src/common/components/pre-publish-panel.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
77
* WordPress dependencies
88
*/
99
import { Notice } from '@wordpress/components';
10+
import { PostFeaturedImage } from '@wordpress/editor';
1011
import { PluginPrePublishPanel } from '@wordpress/edit-post';
1112
import { withSelect } from '@wordpress/data';
1213
import { __ } from '@wordpress/i18n';
@@ -37,18 +38,22 @@ const PrePublishPanel = ( { featuredMedia, dimensions, required } ) => {
3738
title={ __( 'Featured Image', 'amp' ) }
3839
initialOpen="true"
3940
>
40-
<Notice
41-
status={ required ? 'warning' : 'notice' }
42-
isDismissible={ false }
43-
>
44-
{ errors.map( ( errorMessage, index ) => {
45-
return (
46-
<p key={ `error-${ index }` }>
47-
{ errorMessage }
48-
</p>
49-
);
50-
} ) }
51-
</Notice>
41+
<PostFeaturedImage
42+
noticeUI={
43+
<Notice
44+
status={ required ? 'warning' : 'notice' }
45+
isDismissible={ false }
46+
>
47+
{ errors.map( ( errorMessage, index ) => {
48+
return (
49+
<p key={ `error-${ index }` }>
50+
{ errorMessage }
51+
</p>
52+
);
53+
} ) }
54+
</Notice>
55+
}
56+
/>
5257
</PluginPrePublishPanel>
5358
);
5459
};

0 commit comments

Comments
 (0)