Skip to content

Commit

Permalink
Style "number of posts to show" row
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrajka authored and westonruter committed Jun 19, 2017
1 parent 4102e63 commit 211981a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
19 changes: 11 additions & 8 deletions blocks/library/latest-posts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,17 @@ registerBlockType( 'core/latestposts', {
showHint={ false }
/>
</div>
<label htmlFor={ postToShowId }>Number of posts to show:</label>
<input
type="text"
value={ this.props.attributes.poststoshow }
ref={ postToShowId }
id={ postToShowId }
onChange={ () => this.changePostsToShow( this.refs[ postToShowId ].value ) }
/>
<div className="editor-latest-posts__row">
<label htmlFor={ postToShowId }>{ __( 'Number of posts to show' ) } </label>
<input
type="text"
value={ this.props.attributes.poststoshow }
ref={ postToShowId }
id={ postToShowId }
className="editor-latest-posts__input"
onChange={ () => this.changePostsToShow( this.refs[ postToShowId ].value ) }
/>
</div>
</InspectorControls>
),
<div className="blocks-latest-posts" key="latest-posts">
Expand Down
7 changes: 7 additions & 0 deletions blocks/library/latest-posts/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@
.blocks-latest-posts__post-date {
padding-left: 1em;
}

.editor-latest-posts__input {
width: 3em;
-webkit-border-radius: 0.3em;
-moz-border-radius: 0.3em;
border-radius: 0.3em;
}

0 comments on commit 211981a

Please sign in to comment.