@onehat/ui 0.3.72 → 0.3.73

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.72",
3
+ "version": "0.3.73",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -761,7 +761,7 @@ function Form(props) {
761
761
  }
762
762
  }
763
763
 
764
- return <Column {...sizeProps} onLayout={onLayoutDecorated} ref={formRef}>
764
+ return <Column {...sizeProps} pb={10} onLayout={onLayoutDecorated} ref={formRef}>
765
765
  {!!containerWidth && <>
766
766
  {editorType === EDITOR_TYPE__INLINE &&
767
767
  <ScrollView
@@ -6,10 +6,27 @@ import {
6
6
  import TriangleExclamation from '../Icons/TriangleExclamation.js';
7
7
 
8
8
  export default function ErrorMsg(props) {
9
- return <Row justifyContent="center" alignItems="center" my={2} w="100%">
10
- <Icon as={TriangleExclamation} color="red.500" size="sm" mr={1} />
11
- <Text color="red.500">
12
- {props.children}
13
- </Text>
14
- </Row>;
9
+ const {
10
+ textMessage = 'Error',
11
+ textColor = 'red.500',
12
+ } = props;
13
+
14
+ return <Modal {...props} _backdrop={{ bg: "#000" }}>
15
+ <Modal.Content>
16
+ <Modal.Body
17
+ borderTopWidth={0}
18
+ bg="#fff"
19
+ p={3}
20
+ justifyContent="center"
21
+ alignItems="center"
22
+ borderRadius={5}
23
+ flexDirection="row"
24
+ >
25
+ <Row justifyContent="center" alignItems="center" my={2} w="100%">
26
+ <Icon as={TriangleExclamation} color="red.500" size="sm" mr={1} />
27
+ <Text color={textColor}>{textMessage}</Text>
28
+ </Row>
29
+ </Modal.Body>
30
+ </Modal.Content>
31
+ </Modal>;
15
32
  }