From 1e19cc50d18f33d09a537a6bb19f43e548bc0f20 Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Thu, 20 Jul 2023 13:17:47 -0500 Subject: [PATCH] fix: button text alignment, excess button markup & space (#271) * fix(tup-cms): button text alignment (edge cases) The `` inside ); - expect(getByTestId('text').textContent).toEqual(TEST_TEXT); + const { getByRole } = render(); + expect(getByRole('button').textContent).toEqual(TEST_TEXT); }); describe('icons exist as expected when', () => { diff --git a/libs/core-components/src/lib/Button/Button.tsx b/libs/core-components/src/lib/Button/Button.tsx index 2670ccf57..374219e93 100644 --- a/libs/core-components/src/lib/Button/Button.tsx +++ b/libs/core-components/src/lib/Button/Button.tsx @@ -102,9 +102,7 @@ const Button: React.FC = ({ ) : ( '' )} - - {children} - + {children} {iconNameAfter && ( span { - vertical-align: baseline; -} .link-button-delete { font-weight: bold; }