File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,15 +17,14 @@ const animationName = keyframes`
1717
1818const Loader = styled . span `
1919 border-left-color: ${ props => props . color || props . theme . primaryBtnBgd } ;
20- animation: _preloader_spin_ 500ms linear infinite;
2120 border-radius: 50%;
2221 border-top-color: transparent;
2322 border-bottom-color: transparent;
2423 border-right-color: transparent;
2524 cursor: wait;
2625 border-style: solid;
2726 display: block;
28- animation-name : ${ animationName } ;
27+ animation: ${ animationName } 500ms linear infinite ;
2928}` ;
3029
3130export type LoadingWrapperProps = BaseComponentProps & {
Original file line number Diff line number Diff line change 33
44import React from 'react' ;
55import { injectIntl , WrappedComponentProps } from 'react-intl' ;
6- import styled from 'styled-components' ;
6+ import styled , { withTheme } from 'styled-components' ;
77
88import { Button } from '../../common' ;
99import LoadingSpinner from '../../common/loading-spinner' ;
@@ -51,15 +51,20 @@ type LoadDataFooterProps = {
5151 errorText ?: string | null ;
5252} ;
5353
54- const LoadDataFooter : React . FC < LoadDataFooterProps & WrappedComponentProps > = ( {
54+ type ThemeProps = {
55+ theme : any ;
56+ } ;
57+
58+ const LoadDataFooter = ( {
5559 disabled,
5660 intl,
5761 isLoading,
5862 onConfirm,
5963 confirmText,
6064 prependText = '' ,
61- errorText = ''
62- } : LoadDataFooterProps & WrappedComponentProps ) => {
65+ errorText = '' ,
66+ theme
67+ } : LoadDataFooterProps & WrappedComponentProps & ThemeProps ) => {
6368 return (
6469 < LoadDataFooterContainer >
6570 < div >
@@ -71,7 +76,9 @@ const LoadDataFooter: React.FC<LoadDataFooterProps & WrappedComponentProps> = ({
7176 width = "130px"
7277 cta
7378 >
74- { isLoading && < LoadingSpinner size = { 12 } /> }
79+ { isLoading && (
80+ < LoadingSpinner color = { theme . borderColorLT } borderColor = "transparent" size = { 24 } />
81+ ) }
7582 { isLoading
7683 ? null
7784 : intl . formatMessage ( {
@@ -84,4 +91,6 @@ const LoadDataFooter: React.FC<LoadDataFooterProps & WrappedComponentProps> = ({
8491 ) ;
8592} ;
8693
87- export default injectIntl ( LoadDataFooter ) as React . FC < LoadDataFooterProps > ;
94+ export default withTheme ( injectIntl ( LoadDataFooter ) ) as React . FC <
95+ Omit < LoadDataFooterProps , 'theme' >
96+ > ;
You can’t perform that action at this time.
0 commit comments