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, 8 insertions, 4 deletions
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx
index 11369dcbd..822ddf48f 100644
--- a/src/components/ui/button/index.tsx
+++ b/src/components/ui/button/index.tsx
@@ -35,7 +35,11 @@ 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 (window && window.matchMedia('(prefers-reduced-motion: no-preference)')) { 38if (
39 typeof window !== 'undefined' &&
40 window &&
41 window.matchMedia('(prefers-reduced-motion: no-preference)')
42) {
39 buttonTransition = 'background .5s, opacity 0.3s'; 43 buttonTransition = 'background .5s, opacity 0.3s';
40 loaderContainerTransition = 'all 0.3s'; 44 loaderContainerTransition = 'all 0.3s';
41} 45}
@@ -259,6 +263,6 @@ class ButtonComponent extends Component<IProps> {
259 } 263 }
260} 264}
261 265
262export const Button = injectStyle(styles, { injectTheme: true })( 266const Button = injectStyle(styles, { injectTheme: true })(ButtonComponent);
263 ButtonComponent, 267
264); 268export default Button;