Skip to content

Commit

Permalink
feat: coin-icon earned (with animation)
Browse files Browse the repository at this point in the history
  • Loading branch information
sombreroEnPuntas committed Feb 9, 2019
1 parent a0aed6a commit 029bf0a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/icons.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ stories.add('icon', () => {
'snes-logo': 'snes-logo',
'snes-jp-logo': 'snes-jp-logo',
'nes-coin': 'nes-coin',
'nes-coin earned': 'nes-coin earned',
}, 'nes-icon twitter');
const selectedSize = radios('size', {
default: '',
Expand Down
5 changes: 5 additions & 0 deletions scss/pixel-arts/coin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@

@include pixelize($size, $coin, $coin-colors);
}

&.earned {
animation: rotateIn 1.4s ease-out forwards,
fadeOut 2s ease-out forwards;
}
}
20 changes: 20 additions & 0 deletions scss/utilities/animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@
opacity: 0;
}
}

@keyframes rotateIn {
0% {
opacity: 0;
transform: rotateY(0) translateY(100%);
}
100% {
opacity: 1;
transform: rotateY(1800deg) translateY(0);
}
}

@keyframes fadeOut {
70% {
opacity: 1;
}
100% {
opacity: 0;
}
}

0 comments on commit 029bf0a

Please sign in to comment.