Skip to content

Commit

Permalink
will-change css property for loaders animations
Browse files Browse the repository at this point in the history
  • Loading branch information
ronronscelestes committed Sep 6, 2022
1 parent 719c09f commit 421a600
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/strapi-design-system/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const rotation = keyframes`

const LoadingWrapper = styled.div`
animation: ${rotation} 2s infinite linear;
will-change: transform;
`;

const BoxFullHeight = styled(Box)`
Expand Down
1 change: 1 addition & 0 deletions packages/strapi-design-system/src/Loader/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const rotation = keyframes`

const LoaderImg = styled.img`
animation: ${rotation} 1s infinite linear;
will-change: transform;
${({ small, theme }) => small && `width: ${theme.spaces[6]}; height: ${theme.spaces[6]};`}
`;

Expand Down
1 change: 1 addition & 0 deletions packages/strapi-design-system/src/TextButton/TextButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const rotation = keyframes`

const LoadingWrapper = styled.div`
animation: ${rotation} 2s infinite linear;
will-change: transform;
`;

const TextButtonWrapper = styled(Flex)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,7 @@ exports[`Storyshots Design System/Components/Button icons 1`] = `
.c14 {
-webkit-animation: gzYjWD 2s infinite linear;
animation: gzYjWD 2s infinite linear;
will-change: transform;
}

.c9 {
Expand Down Expand Up @@ -26355,6 +26356,7 @@ exports[`Storyshots Design System/Components/Loader base 1`] = `
.c3 {
-webkit-animation: gzYjWD 1s infinite linear;
animation: gzYjWD 1s infinite linear;
will-change: transform;
}

<div
Expand Down Expand Up @@ -26418,6 +26420,7 @@ exports[`Storyshots Design System/Components/Loader small 1`] = `
.c3 {
-webkit-animation: gzYjWD 1s infinite linear;
animation: gzYjWD 1s infinite linear;
will-change: transform;
width: 24px;
height: 24px;
}
Expand Down Expand Up @@ -43526,6 +43529,7 @@ exports[`Storyshots Design System/Components/TextButton loading 1`] = `
.c6 {
-webkit-animation: gzYjWD 2s infinite linear;
animation: gzYjWD 2s infinite linear;
will-change: transform;
}

.c4 {
Expand Down

0 comments on commit 421a600

Please sign in to comment.