@campxdev/shared 1.11.7-1.alpha.11 → 1.11.7-1.alpha.13
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 +1 -1
- package/src/components/Image/Image.tsx +4 -1
- package/src/components/NoDataIllustration.tsx +11 -3
- package/yarn-error.log +15782 -0
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Box } from '@mui/material'
|
|
2
|
+
import { ReactElement } from 'react'
|
|
2
3
|
const brokenImage = require('./broken-image.png')
|
|
3
4
|
|
|
4
5
|
interface ImageProps {
|
|
5
|
-
src: string
|
|
6
|
+
src: string | ReactElement
|
|
6
7
|
alt: string
|
|
7
8
|
height: string | number
|
|
8
9
|
width: string | number
|
|
9
10
|
fit?: 'cover' | 'contain' | 'fill'
|
|
10
11
|
radius?: string | number
|
|
11
12
|
defaultImage?: any
|
|
13
|
+
svg?: boolean
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export default function Image({
|
|
@@ -19,6 +21,7 @@ export default function Image({
|
|
|
19
21
|
fit = 'contain',
|
|
20
22
|
radius = '10px',
|
|
21
23
|
defaultImage = null,
|
|
24
|
+
svg = false,
|
|
22
25
|
}: ImageProps) {
|
|
23
26
|
return (
|
|
24
27
|
<Box
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Box, Typography, styled } from '@mui/material'
|
|
2
|
-
import { ReactNode } from 'react'
|
|
2
|
+
import { ReactElement, ReactNode } from 'react'
|
|
3
3
|
import Image from './Image'
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
imageSrc: string
|
|
6
|
+
imageSrc: string | ReactElement
|
|
7
7
|
height?: string
|
|
8
8
|
message?: string | ReactNode
|
|
9
|
+
svg?: boolean
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export default function NoData({
|
|
12
13
|
imageSrc,
|
|
13
14
|
height = '300px',
|
|
14
15
|
message = 'No Data Found',
|
|
16
|
+
svg = false,
|
|
15
17
|
}: Props) {
|
|
16
18
|
return (
|
|
17
19
|
<Box
|
|
@@ -19,7 +21,13 @@ export default function NoData({
|
|
|
19
21
|
marginTop: '20px',
|
|
20
22
|
}}
|
|
21
23
|
>
|
|
22
|
-
<Image
|
|
24
|
+
<Image
|
|
25
|
+
alt="No Data Found"
|
|
26
|
+
height={height}
|
|
27
|
+
width="auto"
|
|
28
|
+
src={imageSrc}
|
|
29
|
+
svg={svg}
|
|
30
|
+
/>
|
|
23
31
|
{typeof message === 'string' ? (
|
|
24
32
|
<StyledTypography variant="h6">{message}</StyledTypography>
|
|
25
33
|
) : (
|