Skip to content

Commit

Permalink
fix(button): remove animation when a button is rendered
Browse files Browse the repository at this point in the history
This happens when a scroll is made, then it goes to another route, and returns to the previous route with the return button, or when a dialog with a button is opened.
  • Loading branch information
Enlcxx committed May 12, 2019
1 parent 3523973 commit f81cec2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/button/button.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ export const STYLES = (theme: ThemeVariables) => {
},
onFocusByKeyboard: null,
animations: {
'&,&::after': {
transition: 'background 375ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, box-shadow 280ms cubic-bezier(.4,0,.2,1) 0ms'
[
[ '&:hover',
'&:hover::after',
'&:focus',
'&:focus::after',
'{onFocusByKeyboard}' ].join()
]: {
transition: 'background 375ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, box-shadow 280ms cubic-bezier(.4,0,.2,1) 0ms',
}
}
});
Expand Down

0 comments on commit f81cec2

Please sign in to comment.