Skip to content

Commit

Permalink
Ensure Button component uses correct spacing as link element
Browse files Browse the repository at this point in the history
When the `Button` component is rendered as link element (`<a>`) by
passing the `href` or `to` prop it'll now use a reduced line height to
ensure it matches the same layout as if it would have been rendered as
`<button>` element.

GH-112
  • Loading branch information
arcticicestudio committed Jan 12, 2019
1 parent ebc77a9 commit bbb96fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/atoms/core/Button/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ const base = css`
background: none;
padding: 0.375em 0.75em;
user-select: none;
/* Ensure correct spacing when rendering as link element. */
line-height: 1.15;
&:hover:not(:disabled) {
cursor: pointer;
Expand Down

0 comments on commit bbb96fe

Please sign in to comment.