From 1e59be7d6ca8955589b60e71162cc12efa187a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Mon, 11 Sep 2023 19:11:01 +0200 Subject: [PATCH 1/2] Hide Button's loading label --- .changeset/six-buttons-dream.md | 5 +++++ packages/circuit-ui/components/Button/Button.tsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/six-buttons-dream.md diff --git a/.changeset/six-buttons-dream.md b/.changeset/six-buttons-dream.md new file mode 100644 index 0000000000..bfbf09b32c --- /dev/null +++ b/.changeset/six-buttons-dream.md @@ -0,0 +1,5 @@ +--- +'@sumup/circuit-ui': patch +--- + +Hid the Button's loading label in JSDOM environments. diff --git a/packages/circuit-ui/components/Button/Button.tsx b/packages/circuit-ui/components/Button/Button.tsx index fcba6f8224..783d66b30f 100644 --- a/packages/circuit-ui/components/Button/Button.tsx +++ b/packages/circuit-ui/components/Button/Button.tsx @@ -151,7 +151,11 @@ export const Button = forwardRef( )} ref={ref} > - + {loadingLabel} From bcdfc5797ae3387176459d2b8c986b5af920f45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Mon, 11 Sep 2023 21:35:08 +0200 Subject: [PATCH 2/2] Update snapshots --- .../components/Sidebar/__snapshots__/Sidebar.spec.tsx.snap | 2 ++ .../CloseButton/__snapshots__/CloseButton.spec.tsx.snap | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/circuit-ui/components/Sidebar/__snapshots__/Sidebar.spec.tsx.snap b/packages/circuit-ui/components/Sidebar/__snapshots__/Sidebar.spec.tsx.snap index 3c7c3aa148..13ae001b1f 100644 --- a/packages/circuit-ui/components/Sidebar/__snapshots__/Sidebar.spec.tsx.snap +++ b/packages/circuit-ui/components/Sidebar/__snapshots__/Sidebar.spec.tsx.snap @@ -101,6 +101,7 @@ exports[`Sidebar > should render and match snapshot when open 1`] = ` type="button" >