Skip to content

Commit

Permalink
Chrome: Use an expandable panel instead of a dropdown for the PostSch…
Browse files Browse the repository at this point in the history
…edule component
  • Loading branch information
youknowriad committed Oct 18, 2017
1 parent e9d1075 commit 47ee496
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions editor/header/publish-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { withAPIData, PanelBody } from '@wordpress/components';
import './style.scss';
import PostVisibilityLabel from '../../post-visibility/label';
import PostVisibilityForm from '../../post-visibility';
import PostSchedule from '../../sidebar/post-schedule';
import PostScheduleLabel from '../../post-schedule/label';
import PostScheduleForm from '../../post-schedule';
import PublishButton from '../publish-button';

function PublishDropdown( { user, onSubmit } ) {
Expand All @@ -33,7 +34,14 @@ function PublishDropdown( { user, onSubmit } ) {
<PostVisibilityForm />
</PanelBody>
}
<PostSchedule />
{ canPublish &&
<PanelBody initialOpen={ false } title={ [
__( 'Publish: ' ),
<PostScheduleLabel key="label" />,
] }>
<PostScheduleForm />
</PanelBody>
}
<div className="editor-publish-dropdown__publish-button-container">
<PublishButton onSubmit={ onSubmit } />
</div>
Expand Down

0 comments on commit 47ee496

Please sign in to comment.