Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack the Switch to draft and Move to Trash buttons vertically. #51892

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import {
__experimentalHStack as HStack,
__experimentalVStack as VStack,
PanelBody,
} from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
Expand Down Expand Up @@ -53,15 +53,15 @@ function PostStatus( { isOpened, onTogglePanel } ) {
<PostAuthor />
<PostSyncStatus />
{ fills }
<HStack
<VStack
style={ {
marginTop: '16px',
} }
spacing={ 4 }
>
<PostSwitchToDraftButton />
<PostTrash />
</HStack>
</VStack>
</>
) }
</PluginPostStatusInfo.Slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
* WordPress dependencies
*/
import { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';
import { FlexItem } from '@wordpress/components';

export default function PostTrash() {
return (
<PostTrashCheck>
<FlexItem isBlock>
<PostTrashLink />
</FlexItem>
<PostTrashLink />
</PostTrashCheck>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import {
Button,
FlexItem,
__experimentalConfirmDialog as ConfirmDialog,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -41,7 +40,7 @@ function PostSwitchToDraftButton( {
};

return (
<FlexItem isBlock>
<>
<Button
className="editor-post-switch-to-draft"
onClick={ () => {
Expand All @@ -60,7 +59,7 @@ function PostSwitchToDraftButton( {
>
{ alertMessage }
</ConfirmDialog>
</FlexItem>
</>
);
}

Expand Down