@shoutem/ui 7.1.0-beta.2 → 7.1.0-beta.3
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/components/TextInput.js +5 -2
- package/package.json +1 -1
- package/web/style/Alert.scss +65 -0
package/components/TextInput.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/no-multi-comp */
|
|
2
2
|
import React, { forwardRef, PureComponent } from 'react';
|
|
3
|
-
import { TextInput as RNTextInput } from 'react-native';
|
|
3
|
+
import { TextInput as RNTextInput, Platform } from 'react-native';
|
|
4
4
|
import autoBindReact from 'auto-bind/react';
|
|
5
5
|
import { TextInputPropTypes } from 'deprecated-react-native-prop-types';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -60,14 +60,16 @@ class TextInput extends PureComponent {
|
|
|
60
60
|
withoutBorder,
|
|
61
61
|
wiggleAnimation,
|
|
62
62
|
errorText,
|
|
63
|
+
height,
|
|
63
64
|
...otherStyle
|
|
64
65
|
} = style;
|
|
65
66
|
|
|
67
|
+
const containerStyle = Platform.OS === "web" ? { height } : undefined;
|
|
66
68
|
const hasBorder = (isFocused && highlightOnFocus) || !!errorMessage;
|
|
67
69
|
const startErrorAnimation = animate && !!errorMessage;
|
|
68
70
|
|
|
69
71
|
return (
|
|
70
|
-
<View>
|
|
72
|
+
<View style={containerStyle}>
|
|
71
73
|
<Wiggle style={wiggleAnimation} startAnimation={startErrorAnimation}>
|
|
72
74
|
<RNTextInput
|
|
73
75
|
{...otherProps}
|
|
@@ -80,6 +82,7 @@ class TextInput extends PureComponent {
|
|
|
80
82
|
...(hasBorder ? withBorder : withoutBorder),
|
|
81
83
|
...(errorMessage ? errorBorderColor : {}),
|
|
82
84
|
...otherStyle,
|
|
85
|
+
height: 50,
|
|
83
86
|
}}
|
|
84
87
|
ref={forwardedRef}
|
|
85
88
|
/>
|
package/package.json
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.alert-container {
|
|
2
|
+
border-bottom: 1px solid rgba(0,0,0,0.1);
|
|
3
|
+
font-size: 15px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.alert-popup {
|
|
7
|
+
border-radius: 18px;
|
|
8
|
+
padding-bottom: 0px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.alert-title {
|
|
13
|
+
color: black;
|
|
14
|
+
font-size: 20px;
|
|
15
|
+
margin-top: 10px;
|
|
16
|
+
margin-bottom: -10px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.alert-actions {
|
|
20
|
+
border-top: 1px solid;
|
|
21
|
+
margin: 20px 0px 0px 0px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.alert-confirm {
|
|
25
|
+
color: cornflowerblue;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
margin: 0;
|
|
28
|
+
height: 100%;
|
|
29
|
+
border-radius: 0;
|
|
30
|
+
padding: 15px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.alert-cancel {
|
|
34
|
+
color: cornflowerblue;
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
margin: 0;
|
|
37
|
+
height: 100%;
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
padding: 15px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.alert-deny {
|
|
43
|
+
color: red;
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
margin: 0;
|
|
46
|
+
height: 100%;
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
padding: 15px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.full-width {
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.half-width {
|
|
56
|
+
width: 50%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.third-width {
|
|
60
|
+
width: 33%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.border-right {
|
|
64
|
+
border-right: 1px solid black;
|
|
65
|
+
}
|