diff options
author | 2022-05-16 11:35:34 +0530 | |
---|---|---|
committer | 2022-05-16 06:20:11 -0500 | |
commit | bbde4a9d54d9c7dc03f34ca4113061a605dd5040 (patch) | |
tree | 240f6a34a6b772fb3e04d9bf96b1f36bc4cf7cca /src/components/ui/button/index.tsx | |
parent | 6.0.0-nightly.37 [skip ci] (diff) | |
download | ferdium-app-bbde4a9d54d9c7dc03f34ca4113061a605dd5040.tar.gz ferdium-app-bbde4a9d54d9c7dc03f34ca4113061a605dd5040.tar.zst ferdium-app-bbde4a9d54d9c7dc03f34ca4113061a605dd5040.zip |
remove duplicate Button component
Diffstat (limited to 'src/components/ui/button/index.tsx')
-rw-r--r-- | src/components/ui/button/index.tsx | 12 |
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> { | |||
35 | let buttonTransition: string = 'none'; | 35 | let buttonTransition: string = 'none'; |
36 | let loaderContainerTransition: string = 'none'; | 36 | let loaderContainerTransition: string = 'none'; |
37 | 37 | ||
38 | if (window && window.matchMedia('(prefers-reduced-motion: no-preference)')) { | 38 | if ( |
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 | ||
262 | export const Button = injectStyle(styles, { injectTheme: true })( | 266 | const Button = injectStyle(styles, { injectTheme: true })(ButtonComponent); |
263 | ButtonComponent, | 267 | |
264 | ); | 268 | export default Button; |