@onehat/ui 0.3.72 → 0.3.74
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
|
@@ -712,7 +712,7 @@ function Form(props) {
|
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
if (!_.isEmpty(formState.errors)) {
|
|
715
|
+
if (!_.isEmpty(formState.errors) || !formState.isValid) {
|
|
716
716
|
isSaveDisabled = true;
|
|
717
717
|
isSubmitDisabled = true;
|
|
718
718
|
}
|
|
@@ -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
|
|
@@ -12,12 +12,13 @@ export default function ConfirmationMessage(props) {
|
|
|
12
12
|
onOk = emptyFn,
|
|
13
13
|
} = props;
|
|
14
14
|
|
|
15
|
-
return <Modal {...props} _backdrop={{ bg: "#000" }}>
|
|
15
|
+
return <Modal isOpen={true} {...props} _backdrop={{ bg: "#000" }}>
|
|
16
16
|
<Modal.Content maxWidth="400px">
|
|
17
|
+
<Modal.Header>Confirm</Modal.Header>
|
|
17
18
|
<Modal.Body p={5} pb={0} borderTopWidth={0}>
|
|
18
19
|
<Text color="#000">{textMessage}</Text>
|
|
19
20
|
</Modal.Body>
|
|
20
|
-
<Modal.Footer
|
|
21
|
+
<Modal.Footer py={2} pr={4}>
|
|
21
22
|
<Button variant="ghost" color="primary.800" onPress={onCancel}>Cancel</Button>
|
|
22
23
|
<Button variant="ghost" color="primary.800" onPress={onOk}>OK</Button>
|
|
23
24
|
</Modal.Footer>
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Button,
|
|
2
3
|
Icon,
|
|
3
|
-
|
|
4
|
+
Modal,
|
|
4
5
|
Text,
|
|
5
6
|
} from 'native-base';
|
|
6
7
|
import TriangleExclamation from '../Icons/TriangleExclamation.js';
|
|
7
8
|
|
|
8
9
|
export default function ErrorMsg(props) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const {
|
|
11
|
+
text = 'Error',
|
|
12
|
+
color = 'red.500',
|
|
13
|
+
onOk,
|
|
14
|
+
} = props;
|
|
15
|
+
console.log('render ErrorMessage text', text);
|
|
16
|
+
return <Modal isOpen={true} {...props} _backdrop={{ bg: "#000" }}>
|
|
17
|
+
<Modal.Content>
|
|
18
|
+
<Modal.Header>Alert</Modal.Header>
|
|
19
|
+
<Modal.Body
|
|
20
|
+
borderTopWidth={0}
|
|
21
|
+
bg="#fff"
|
|
22
|
+
p={3}
|
|
23
|
+
justifyContent="center"
|
|
24
|
+
alignItems="center"
|
|
25
|
+
borderRadius={5}
|
|
26
|
+
flexDirection="row"
|
|
27
|
+
>
|
|
28
|
+
<Icon as={TriangleExclamation} color="red.500" size="md" mr={1} />
|
|
29
|
+
<Text color={color} fontSize="18px">{text}</Text>
|
|
30
|
+
</Modal.Body>
|
|
31
|
+
<Modal.Footer py={2} pr={4}>
|
|
32
|
+
<Button color="primary.800" onPress={onOk}>OK</Button>
|
|
33
|
+
</Modal.Footer>
|
|
34
|
+
</Modal.Content>
|
|
35
|
+
</Modal>;
|
|
15
36
|
}
|