aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/button/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/button/index.tsx')
-rw-r--r--src/components/ui/button/index.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx
index 822ddf48f..11369dcbd 100644
--- a/src/components/ui/button/index.tsx
+++ b/src/components/ui/button/index.tsx
@@ -35,11 +35,7 @@ interface IProps extends IFormField, WithStylesProps<typeof styles> {
35let buttonTransition: string = 'none'; 35let buttonTransition: string = 'none';
36let loaderContainerTransition: string = 'none'; 36let loaderContainerTransition: string = 'none';
37 37
38if ( 38if (window && window.matchMedia('(prefers-reduced-motion: no-preference)')) {
39 typeof window !== 'undefined' &&
40 window &&
41 window.matchMedia('(prefers-reduced-motion: no-preference)')
42) {
43 buttonTransition = 'background .5s, opacity 0.3s'; 39 buttonTransition = 'background .5s, opacity 0.3s';
44 loaderContainerTransition = 'all 0.3s'; 40 loaderContainerTransition = 'all 0.3s';
45} 41}
@@ -263,6 +259,6 @@ class ButtonComponent extends Component<IProps> {
263 } 259 }
264} 260}
265 261
266const Button = injectStyle(styles, { injectTheme: true })(ButtonComponent); 262export const Button = injectStyle(styles, { injectTheme: true })(
267 263 ButtonComponent,
268export default Button; 264);