Skip to content

Commit

Permalink
NUX design tweaks
Browse files Browse the repository at this point in the history
- Increase the width of GuideTips
- Lower GuideTips so that they don't appear above the WP Admin toolbar
- Rename 'Got it' to 'Tell me more!' and make it a link
  • Loading branch information
noisysocks committed May 23, 2018
1 parent c7c3603 commit 66ba2ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 2 additions & 3 deletions nux/components/guide-tip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ export class GuideTip extends Component {
<p>
<Button
ref={ this.advanceButtonRef }
isLarge
isPrimary
isLink
onClick={ onAdvance }
>
{ __( 'Got it' ) }
{ __( 'Tell me more!' ) }
</Button>
</p>
<IconButton
Expand Down
8 changes: 7 additions & 1 deletion nux/components/guide-tip/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
margin-top: auto;
position: absolute;
right: auto;
top: -50px;
top: -20px;
width: 350px;
}

Expand All @@ -96,4 +96,10 @@
}
}
}

@include break-small {
.editor-new-user-tip__content {
width: 450px;
}
}
}
5 changes: 2 additions & 3 deletions nux/components/guide-tip/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ exports[`GuideTip should render correctly 1`] = `
</p>
<p>
<Button
isLarge={true}
isPrimary={true}
isLink={true}
>
Got it
Tell me more!
</Button>
</p>
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion nux/components/guide-tip/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe( 'GuideTip', () => {
It looks like you’re writing a letter. Would you like help?
</GuideTip>
);
wrapper.find( 'Button[children="Got it"]' ).first().simulate( 'click' );
wrapper.find( 'Button[children="Tell me more!"]' ).first().simulate( 'click' );
expect( onAdvance ).toHaveBeenCalled();
} );

Expand Down

0 comments on commit 66ba2ac

Please sign in to comment.