Skip to content

Commit

Permalink
Add isScary prop to button.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Jun 20, 2018
1 parent 253a530 commit 20f5489
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function Button( props, ref ) {
isBusy,
isDefault,
isLink,
isScary,
className,
disabled,
focus,
Expand All @@ -39,6 +40,7 @@ export function Button( props, ref ) {
'is-toggled': isToggled,
'is-busy': isBusy,
'is-link': isLink,
'is-scary': isScary,
} );

const tag = href !== undefined && ! disabled ? 'a' : 'button';
Expand Down
5 changes: 5 additions & 0 deletions components/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
}
}

/* Buttons that look scary */
&.is-link.is-scary {
color: $alert-red;
}

&:active {
color: currentColor;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-featured-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function PostFeaturedImage( { featuredImageId, onUpdateImage, onRemoveImage, med
</div>
}
{ !! featuredImageId &&
<Button onClick={ onRemoveImage } isDefault isLarge>
<Button onClick={ onRemoveImage } isLink isScary>
{ postLabel.remove_featured_image || DEFAULT_REMOVE_FEATURE_IMAGE_LABEL }
</Button>
}
Expand Down

0 comments on commit 20f5489

Please sign in to comment.