diff options
author | André Oliveira <oliveira.andrerodrigues95@gmail.com> | 2022-05-17 08:42:04 +0100 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-05-17 06:09:18 -0500 |
commit | 6eb5937039b4d416d2c0558d3f4b29783cc6d533 (patch) | |
tree | 887f3b76e08594df5daabc7c61306b61db896d22 /src/components/ui/button/index.tsx | |
parent | 6.0.0-nightly.38 [skip ci] (diff) | |
download | ferdium-app-6eb5937039b4d416d2c0558d3f4b29783cc6d533.tar.gz ferdium-app-6eb5937039b4d416d2c0558d3f4b29783cc6d533.tar.zst ferdium-app-6eb5937039b4d416d2c0558d3f4b29783cc6d533.zip |
Revert "remove duplicate Button component"
This reverts commit bbde4a9d54d9c7dc03f34ca4113061a605dd5040.
Diffstat (limited to 'src/components/ui/button/index.tsx')
-rw-r--r-- | src/components/ui/button/index.tsx | 12 |
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> { | |||
35 | let buttonTransition: string = 'none'; | 35 | let buttonTransition: string = 'none'; |
36 | let loaderContainerTransition: string = 'none'; | 36 | let loaderContainerTransition: string = 'none'; |
37 | 37 | ||
38 | if ( | 38 | if (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 | ||
266 | const Button = injectStyle(styles, { injectTheme: true })(ButtonComponent); | 262 | export const Button = injectStyle(styles, { injectTheme: true })( |
267 | 263 | ButtonComponent, | |
268 | export default Button; | 264 | ); |