File tree 1 file changed +11
-2
lines changed
packages/ra-ui-materialui/src/layout
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import { styled } from '@mui/material/styles' ;
3
+ import { SxProps } from '@mui/material' ;
3
4
import PropTypes from 'prop-types' ;
4
5
import CircularProgress from '@mui/material/CircularProgress' ;
5
6
import { useTranslate } from 'ra-core' ;
6
7
7
- export const Loading = props => {
8
+ export const Loading = ( props : LoadingProps ) => {
8
9
const {
9
10
className,
10
11
loadingPrimary = 'ra.page.loading' ,
11
12
loadingSecondary = 'ra.message.loading' ,
13
+ ...rest
12
14
} = props ;
13
15
14
16
const translate = useTranslate ( ) ;
15
17
return (
16
- < Root className = { className } >
18
+ < Root className = { className } { ... rest } >
17
19
< div className = { LoadingClasses . message } >
18
20
< CircularProgress
19
21
className = { LoadingClasses . icon }
@@ -37,6 +39,13 @@ Loading.defaultProps = {
37
39
loadingSecondary : 'ra.message.loading' ,
38
40
} ;
39
41
42
+ export interface LoadingProps {
43
+ className ?: string ;
44
+ loadingPrimary ?: string ;
45
+ loadingSecondary ?: string ;
46
+ sx ?: SxProps ;
47
+ }
48
+
40
49
const PREFIX = 'RaLoading' ;
41
50
42
51
export const LoadingClasses = {
You can’t perform that action at this time.
0 commit comments