aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/InfoBar.tsx
diff options
context:
space:
mode:
authorLibravatar Pawel Kowalski <25907418+MentorPK@users.noreply.github.com>2023-10-27 02:19:31 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-27 01:19:31 +0100
commit78cb67c641e5723af59e0cf8a172a443aafa6f33 (patch)
treeec121e8efecf027717ce4e58b29c72fa93ed3315 /src/components/ui/InfoBar.tsx
parent6.5.3-nightly.4 [skip ci] (diff)
downloadferdium-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/InfoBar.tsx')
-rw-r--r--src/components/ui/InfoBar.tsx18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/components/ui/InfoBar.tsx b/src/components/ui/InfoBar.tsx
index b7bfe0fa6..ae37546df 100644
--- a/src/components/ui/InfoBar.tsx
+++ b/src/components/ui/InfoBar.tsx
@@ -1,11 +1,11 @@
1import { Component, MouseEventHandler, ReactNode } from 'react'; 1import { Component, MouseEventHandler, ReactNode } from 'react';
2import { observer } from 'mobx-react'; 2import { observer } from 'mobx-react';
3import classnames from 'classnames'; 3import classnames from 'classnames';
4import Loader from 'react-loader';
5import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; 4import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl';
6 5
7import { mdiClose } from '@mdi/js'; 6import { mdiClose } from '@mdi/js';
8import { noop } from 'lodash'; 7import { noop } from 'lodash';
8import Loader from './loader/index';
9import Appear from './effects/Appear'; 9import Appear from './effects/Appear';
10import Icon from './icon'; 10import Icon from './icon';
11 11
@@ -67,15 +67,13 @@ class InfoBar extends Component<IProps> {
67 {children} 67 {children}
68 {ctaLabel && ( 68 {ctaLabel && (
69 <button type="button" className="info-bar__cta" onClick={onClick}> 69 <button type="button" className="info-bar__cta" onClick={onClick}>
70 <Loader 70 <div
71 loaded={!ctaLoading} 71 className="contentWrapper"
72 lines={10} 72 style={{ display: 'flex', gap: '8px' }}
73 scale={0.3} 73 >
74 color="#FFF" 74 <Loader size={18} loaded={!ctaLoading} color="#FFFFFF" />
75 // @ts-expect-error Property 'component' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactLoader> & Readonly<LoaderProps> 75 {ctaLabel}
76 component="span" 76 </div>
77 />
78 {ctaLabel}
79 </button> 77 </button>
80 )} 78 )}
81 {!sticky && ( 79 {!sticky && (