@campxdev/shared 1.11.10 → 1.11.12
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
|
@@ -29,7 +29,8 @@ export default function ErrorModalProvider({ children }) {
|
|
|
29
29
|
const fallbackMessage = props.fallBack ?? 'Something went wrong.'
|
|
30
30
|
const errorMessage =
|
|
31
31
|
typeof props.error?.response?.data?.message !== 'string'
|
|
32
|
-
? props.error?.response?.data?.message?.
|
|
32
|
+
? props.error?.response?.data?.message?.replace(/\n/g, '<br>') ??
|
|
33
|
+
fallbackMessage
|
|
33
34
|
: props.error?.response?.data?.message
|
|
34
35
|
|
|
35
36
|
setModal({
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Box, SxProps, Typography } from '@mui/material'
|
|
2
|
+
import { Variant } from '@mui/material/styles/createTypography'
|
|
3
|
+
|
|
4
|
+
interface ItemProps {
|
|
5
|
+
text: string
|
|
6
|
+
sx?: SxProps
|
|
7
|
+
variant?: Variant
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface SignatureFooterProps {
|
|
11
|
+
containerSx?: SxProps
|
|
12
|
+
list: ItemProps[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default function SignatureFooter({
|
|
16
|
+
containerSx,
|
|
17
|
+
list,
|
|
18
|
+
}: SignatureFooterProps) {
|
|
19
|
+
return (
|
|
20
|
+
<Box
|
|
21
|
+
sx={{
|
|
22
|
+
display: 'flex',
|
|
23
|
+
justifyContent: 'space-around',
|
|
24
|
+
margin: '100px 0px 50px 0px',
|
|
25
|
+
...containerSx,
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
{list?.map((item, index) => (
|
|
29
|
+
<Typography key={index} sx={item?.sx} variant={item?.variant || 'h1'}>
|
|
30
|
+
{item?.text}
|
|
31
|
+
</Typography>
|
|
32
|
+
))}
|
|
33
|
+
</Box>
|
|
34
|
+
)
|
|
35
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -60,6 +60,7 @@ export { default as PageHeader } from './PageHeader'
|
|
|
60
60
|
export { default as useConfirm } from './PopupConfirm/useConfirm'
|
|
61
61
|
export { default as ReportHeader } from './ReportHeader'
|
|
62
62
|
export { default as ReportPageHeader } from './ReportPageHeader'
|
|
63
|
+
export { default as SignatureFooter } from './SignatureFooter'
|
|
63
64
|
export { default as Spinner } from './Spinner'
|
|
64
65
|
export { default as PaymentStepper } from './Stepper'
|
|
65
66
|
export { default as SwitchButton } from './SwitchButton'
|