-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract a PostPanelRow component from the different sidebar panels (#…
- Loading branch information
1 parent
8863b49
commit 447a6de
Showing
20 changed files
with
133 additions
and
146 deletions.
There are no files selected for viewing
13 changes: 10 additions & 3 deletions
13
packages/edit-post/src/components/sidebar/post-pending-status/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
packages/edit-post/src/components/sidebar/post-sticky/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/edit-post/src/components/sidebar/post-template/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
packages/edit-post/src/components/sidebar/post-visibility/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classnames from 'classnames'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __experimentalHStack as HStack } from '@wordpress/components'; | ||
import { forwardRef } from '@wordpress/element'; | ||
|
||
const PostPanelRow = forwardRef( ( { className, label, children }, ref ) => { | ||
return ( | ||
<HStack | ||
className={ classnames( 'editor-post-panel__row', className ) } | ||
ref={ ref } | ||
> | ||
{ label ? ( | ||
<> | ||
<div className="editor-post-panel__row-label"> | ||
{ label } | ||
</div> | ||
<div className="editor-post-panel__row-control"> | ||
{ children } | ||
</div> | ||
</> | ||
) : ( | ||
children | ||
) } | ||
</HStack> | ||
); | ||
} ); | ||
|
||
export default PostPanelRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.editor-post-panel__row { | ||
width: 100%; | ||
justify-content: flex-start; | ||
align-items: flex-start; | ||
min-height: $button-size; | ||
} | ||
|
||
.editor-post-panel__row-label { | ||
width: 30%; | ||
flex-shrink: 0; | ||
} | ||
|
||
.editor-post-panel__row-control { | ||
flex-grow: 1; | ||
} |
Oops, something went wrong.