@platformatic/ui-components 0.1.125 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,11 +4,17 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import styles from './LoadingSpinnerV2.module.css'
|
|
5
5
|
import { SpinnerCircular } from 'spinners-react'
|
|
6
6
|
|
|
7
|
-
function LoadingSpinnerV2 ({
|
|
7
|
+
function LoadingSpinnerV2 ({
|
|
8
|
+
loading,
|
|
9
|
+
applySentences,
|
|
10
|
+
color,
|
|
11
|
+
containerClassName
|
|
12
|
+
}) {
|
|
13
|
+
const defaultContainerClassName = containerClassName || `${styles.container}`
|
|
8
14
|
// If null then loading not started, if true then loading, if false then done loading
|
|
9
15
|
return loading
|
|
10
16
|
? (
|
|
11
|
-
<div className={
|
|
17
|
+
<div className={defaultContainerClassName} data-testid='loading-spinner'>
|
|
12
18
|
<div className={styles.content}>
|
|
13
19
|
<SpinnerCircular thickness={180} size={80} color={color} />
|
|
14
20
|
{applySentences?.sentences.length > 0 && (
|
|
@@ -33,13 +39,18 @@ LoadingSpinnerV2.propTypes = {
|
|
|
33
39
|
/**
|
|
34
40
|
* color
|
|
35
41
|
*/
|
|
36
|
-
color: PropTypes.string
|
|
42
|
+
color: PropTypes.string,
|
|
43
|
+
/**
|
|
44
|
+
* containerClassName
|
|
45
|
+
*/
|
|
46
|
+
containerClassName: PropTypes.string
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
LoadingSpinnerV2.defaultProps = {
|
|
40
50
|
loading: false,
|
|
41
51
|
applySentences: {},
|
|
42
|
-
color: '#FFFFFF'
|
|
52
|
+
color: '#FFFFFF',
|
|
53
|
+
containerClassName: ''
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
export default LoadingSpinnerV2
|