From 874fda8f3b3726ff037cb734aa1f2a17d7e73cf1 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Fri, 18 Jan 2019 11:13:00 +0100 Subject: [PATCH 1/2] Fixes #892: Removes unnecessary button margin --- src/Button/Button.tsx | 5 ++++- src/Button/README.md | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Button/Button.tsx b/src/Button/Button.tsx index 2f832f7fa..e7e7d7fc8 100644 --- a/src/Button/Button.tsx +++ b/src/Button/Button.tsx @@ -98,7 +98,10 @@ const containerStyles: Interpolation< }, } : {}), - marginRight: theme.space.small, + + "* + &": { + marginLeft: theme.space.small, + }, } } diff --git a/src/Button/README.md b/src/Button/README.md index 27e6358aa..19bdfe95d 100644 --- a/src/Button/README.md +++ b/src/Button/README.md @@ -70,6 +70,26 @@ Using a `to` prop navigates automatically, and render proper anchor tags with hr ``` +### Neighbor Behavior + +`Button`s placed next to other elements need to space their surroundings correctly, whereas individual `Button`s don't displace anything. + +```jsx + + + + + } +> +
+ + +
+
+``` + ### Full-width Buttons ```jsx From c57fbfd715856f196bbace7c621e44331bfbdf78 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Fri, 18 Jan 2019 11:18:08 +0100 Subject: [PATCH 2/2] Update snapshots --- src/Button/__tests__/__snapshots__/Button.test.tsx.snap | 2 +- .../__tests__/__snapshots__/ButtonGroup.test.tsx.snap | 2 +- .../__tests__/__snapshots__/Paginator.test.tsx.snap | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Button/__tests__/__snapshots__/Button.test.tsx.snap b/src/Button/__tests__/__snapshots__/Button.test.tsx.snap index ca16dbb6b..1b775be1d 100644 --- a/src/Button/__tests__/__snapshots__/Button.test.tsx.snap +++ b/src/Button/__tests__/__snapshots__/Button.test.tsx.snap @@ -8,7 +8,7 @@ exports[`Button Component Should initialize properly 1`] = ` class="css-ar73w8-Messages" /> diff --git a/src/ButtonGroup/__tests__/__snapshots__/ButtonGroup.test.tsx.snap b/src/ButtonGroup/__tests__/__snapshots__/ButtonGroup.test.tsx.snap index 36db88e06..05803a354 100644 --- a/src/ButtonGroup/__tests__/__snapshots__/ButtonGroup.test.tsx.snap +++ b/src/ButtonGroup/__tests__/__snapshots__/ButtonGroup.test.tsx.snap @@ -11,7 +11,7 @@ exports[`ButtonGroup Component Should initialize properly 1`] = ` class="css-1o7twmc-buttongroup" > diff --git a/src/Paginator/__tests__/__snapshots__/Paginator.test.tsx.snap b/src/Paginator/__tests__/__snapshots__/Paginator.test.tsx.snap index 7f0556a62..9557126f3 100644 --- a/src/Paginator/__tests__/__snapshots__/Paginator.test.tsx.snap +++ b/src/Paginator/__tests__/__snapshots__/Paginator.test.tsx.snap @@ -11,13 +11,13 @@ exports[`Paginator Component Should initialize properly 1`] = ` class="css-g700yk-paginator" >