diff options
author | Pawel Kowalski <25907418+MentorPK@users.noreply.github.com> | 2023-10-27 02:19:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 01:19:31 +0100 |
commit | 78cb67c641e5723af59e0cf8a172a443aafa6f33 (patch) | |
tree | ec121e8efecf027717ce4e58b29c72fa93ed3315 /src/components/ui/Infobox.tsx | |
parent | 6.5.3-nightly.4 [skip ci] (diff) | |
download | ferdium-app-78cb67c641e5723af59e0cf8a172a443aafa6f33.tar.gz ferdium-app-78cb67c641e5723af59e0cf8a172a443aafa6f33.tar.zst ferdium-app-78cb67c641e5723af59e0cf8a172a443aafa6f33.zip |
feat: change loader component (#1410)
* CHANGED react-loater to react-loader-spinner
* CHANGED brandColor to primary
* feat: change loader component
- remove redundant /index path from Loader imports in multiple files
- remove commented out braces in RecipesDashboard
- remove redundant color which is default from Loader in InfoBar
- update size of Loader in InfoBar to be the same as InfoBox
- change passed size prop from string to number in Button component
- add slight gap for FullscreenLoader to styles.ts
- fix Loader to check for color primary which is passed rather than brandColor
- remove hardcoded width and height from WorkspaceSwitchingIndicator which lead to elements not being vertically centered
- remove color prop from Loader in WorkspaceSwitchingIndicator since white is already the default
- remove switchingIndicator.spinnerColor from default theme since white is already the default
* implement PR feedback
* re-add color to WorkspaceSwitchingIndicator
---------
Co-authored-by: MCMXC <16797721+mcmxcdev@users.noreply.github.com>
Diffstat (limited to 'src/components/ui/Infobox.tsx')
-rw-r--r-- | src/components/ui/Infobox.tsx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/components/ui/Infobox.tsx b/src/components/ui/Infobox.tsx index a794a5e9b..742717ed7 100644 --- a/src/components/ui/Infobox.tsx +++ b/src/components/ui/Infobox.tsx | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component, MouseEventHandler, ReactElement, ReactNode } from 'react'; | 1 | import { Component, MouseEventHandler, ReactElement, ReactNode } from 'react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import Loader from 'react-loader'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
5 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; | 4 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; |
6 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
7 | import { observer } from 'mobx-react'; | 6 | import { observer } from 'mobx-react'; |
7 | import Loader from './loader/index'; | ||
8 | import Icon from './icon'; | 8 | import Icon from './icon'; |
9 | 9 | ||
10 | const icons = { | 10 | const icons = { |
@@ -80,15 +80,13 @@ class Infobox extends Component<IProps, IState> { | |||
80 | <div className="infobox__content">{children}</div> | 80 | <div className="infobox__content">{children}</div> |
81 | {ctaLabel && ( | 81 | {ctaLabel && ( |
82 | <button className="infobox__cta" onClick={ctaOnClick} type="button"> | 82 | <button className="infobox__cta" onClick={ctaOnClick} type="button"> |
83 | <Loader | 83 | <div |
84 | loaded={!ctaLoading} | 84 | className="contentWrapper" |
85 | lines={10} | 85 | style={{ display: 'flex', gap: '8px' }} |
86 | scale={0.3} | 86 | > |
87 | color="#FFF" | 87 | <Loader size={18} loaded={!ctaLoading} color="#FFFFFF" /> |
88 | // @ts-expect-error Property 'component' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactLoader> & Readonly<LoaderProps> | 88 | {ctaLabel} |
89 | component="span" | 89 | </div> |
90 | /> | ||
91 | {ctaLabel} | ||
92 | </button> | 90 | </button> |
93 | )} | 91 | )} |
94 | {dismissible && ( | 92 | {dismissible && ( |