Skip to content

Commit

Permalink
Update visuals to match updated design
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and retrofox committed Oct 29, 2019
1 parent 29c263f commit 604e8eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import {
Button,
IconButton,
Icon,
ToggleControl,
Expand Down Expand Up @@ -170,8 +171,10 @@ function LinkControl( { currentLink, fetchSearchSuggestions, renderAdditionalSet
</ExternalLink>
<span className="block-editor-link-control__search-item-info">{ currentLink.info || filterURLForDisplay( safeDecodeURI( currentLink.url ) ) || '' }</span>
</span>
<span className="block-editor-link-control__search-item-type">{ currentLink.type.toLowerCase() || '' }</span>
<IconButton className="block-editor-link-control__search-item-action block-editor-link-control__search-item-action--edit" icon="edit" label={ __( 'Edit' ) } onClick={ onStartEditing } />

<Button isDefault onClick={ onStartEditing } className="block-editor-link-control__search-item-action block-editor-link-control__search-item-action--edit">
Change
</Button>
</div>
) }

Expand Down
16 changes: 8 additions & 8 deletions packages/block-editor/src/components/link-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@

&.is-current {
background: transparent;
border: 2px solid #ccc;
margin: $grid-size-large;
width: calc(100% - #{$grid-size-large*2});
border: 0;
width: 100%;
cursor: default;
padding-right: 10px; // visually compensate for edit icon padding
padding: $grid-size-large;
padding-left: $grid-size-xlarge;
}

.block-editor-link-control__search-item-header {
display: block;
margin-right: 1em;
margin-right: $grid-size-xlarge;
}

.block-editor-link-control__search-item-icon {
Expand Down Expand Up @@ -148,8 +148,8 @@

.block-editor-link-control__settings {
border-top: 1px solid #e1e1e1;
margin: 0 $grid-size-large;
padding: $grid-size-large $grid-size-large;
margin: 0;
padding: $grid-size-large $grid-size-xlarge;

:last-child {
margin-bottom: 0;
Expand All @@ -172,6 +172,6 @@
}

.block-editor-link-control__search-item-action {
margin-left: 0.5em;
margin-left: auto; // push to far right hand side
flex-shrink: 0;
}

0 comments on commit 604e8eb

Please sign in to comment.