@onehat/ui 0.3.73 → 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
|
@@ -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,18 +1,21 @@
|
|
|
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
|
const {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
text = 'Error',
|
|
12
|
+
color = 'red.500',
|
|
13
|
+
onOk,
|
|
12
14
|
} = props;
|
|
13
|
-
|
|
14
|
-
return <Modal {...props} _backdrop={{ bg: "#000" }}>
|
|
15
|
+
console.log('render ErrorMessage text', text);
|
|
16
|
+
return <Modal isOpen={true} {...props} _backdrop={{ bg: "#000" }}>
|
|
15
17
|
<Modal.Content>
|
|
18
|
+
<Modal.Header>Alert</Modal.Header>
|
|
16
19
|
<Modal.Body
|
|
17
20
|
borderTopWidth={0}
|
|
18
21
|
bg="#fff"
|
|
@@ -22,11 +25,12 @@ export default function ErrorMsg(props) {
|
|
|
22
25
|
borderRadius={5}
|
|
23
26
|
flexDirection="row"
|
|
24
27
|
>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
<Text color={textColor}>{textMessage}</Text>
|
|
28
|
-
</Row>
|
|
28
|
+
<Icon as={TriangleExclamation} color="red.500" size="md" mr={1} />
|
|
29
|
+
<Text color={color} fontSize="18px">{text}</Text>
|
|
29
30
|
</Modal.Body>
|
|
31
|
+
<Modal.Footer py={2} pr={4}>
|
|
32
|
+
<Button color="primary.800" onPress={onOk}>OK</Button>
|
|
33
|
+
</Modal.Footer>
|
|
30
34
|
</Modal.Content>
|
|
31
35
|
</Modal>;
|
|
32
36
|
}
|