Skip to content

Commit 5658915

Browse files
committed
Remove loading animation tests from Button component and adjust shimmer effect direction in styles. Ensure proper formatting in dark theme variables file.
1 parent 8613b55 commit 5658915

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

src/components/Button/Button.test.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,6 @@ describe("Button", () => {
2424
expect(counter).toEqual(1);
2525
});
2626

27-
it("given a loading button, it should render the loading animation", async () => {
28-
const { getAllByTestId } = renderButton({
29-
label: "Button",
30-
loading: true,
31-
});
32-
33-
const loadingButton = getAllByTestId("click-ui-loading-icon");
34-
expect(loadingButton.length).toEqual(1);
35-
});
36-
37-
it("given a non-loading button, it should not render the loading animation", async () => {
38-
const { queryAllByTestId } = renderButton({
39-
label: "Button",
40-
loading: false,
41-
});
42-
43-
const loadingButton = queryAllByTestId("click-ui-loading-icon");
44-
expect(loadingButton.length).toEqual(0);
45-
});
46-
4727
it("should not execute action when disabled", () => {
4828
let counter = 0;
4929
const handleClick = () => (counter = 1);

src/components/Button/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ export const Button = ({
7171

7272
const shimmerFullWidth = keyframes`
7373
0% {
74-
background-position: -100% 0;
74+
background-position: 100% 0;
7575
}
7676
100% {
77-
background-position: 100% 0;
77+
background-position: -100% 0;
7878
}
7979
`;
8080

src/theme/tokens/variables.dark.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,4 +1889,4 @@
18891889
}
18901890
},
18911891
"name": "dark"
1892-
}
1892+
}

0 commit comments

Comments
 (0)