Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

fix(button): center icons #63

Merged
merged 1 commit into from
Aug 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,12 @@ export const Button: React.FC<Props> = ({
{icon && (
<span
css={{
alignItems: "center",
// This needs to be `inline-flex` and not the default of
// `inline-block` to vertically center the icon automatically
display: "inline-flex",
height: iconSize,
justifyContent: "center",
// The `4px` will be on the right to separate the icon from the text
margin: iconOnly ? 0 : "0 4px 0",
width: iconSize,
Expand Down