secullum-react-native-ui 4.17.4 → 4.17.5
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.
|
@@ -10,7 +10,6 @@ export interface ButtonProperties {
|
|
|
10
10
|
disabledBackgroundColor?: string;
|
|
11
11
|
disabledLabelColor?: string;
|
|
12
12
|
nativeID?: string;
|
|
13
|
-
loading?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export declare class Button extends React.Component<ButtonProperties> {
|
|
16
15
|
static defaultProps: {
|
|
@@ -18,7 +17,6 @@ export declare class Button extends React.Component<ButtonProperties> {
|
|
|
18
17
|
};
|
|
19
18
|
getStyles: () => {
|
|
20
19
|
touchable: {
|
|
21
|
-
flexDirection: "row";
|
|
22
20
|
backgroundColor: string;
|
|
23
21
|
borderColor: string;
|
|
24
22
|
borderWidth: number;
|
package/lib/components/Button.js
CHANGED
|
@@ -14,7 +14,6 @@ class Button extends React.Component {
|
|
|
14
14
|
const theme = (0, theme_1.getTheme)();
|
|
15
15
|
const styles = react_native_1.StyleSheet.create({
|
|
16
16
|
touchable: {
|
|
17
|
-
flexDirection: 'row',
|
|
18
17
|
backgroundColor: theme.backgroundColor1,
|
|
19
18
|
borderColor: theme.borderColor1,
|
|
20
19
|
borderWidth: 1,
|
|
@@ -49,16 +48,14 @@ class Button extends React.Component {
|
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
render() {
|
|
52
|
-
const { text, primary, style, textStyle, onPress, disabled, nativeID
|
|
51
|
+
const { text, primary, style, textStyle, onPress, disabled, nativeID } = this.props;
|
|
53
52
|
const styles = this.getStyles();
|
|
54
|
-
const theme = (0, theme_1.getTheme)();
|
|
55
53
|
return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.7, style: [
|
|
56
54
|
styles.touchable,
|
|
57
55
|
primary && styles.touchablePrimary,
|
|
58
56
|
style,
|
|
59
57
|
disabled && styles.disabled
|
|
60
58
|
], onPress: onPress, disabled: disabled, testID: (0, test_1.getTestID)(nativeID) },
|
|
61
|
-
loading && React.createElement(react_native_1.ActivityIndicator, { color: theme.borderColor1 }),
|
|
62
59
|
React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
|
|
63
60
|
styles.text,
|
|
64
61
|
primary && styles.textPrimary,
|
|
@@ -10,9 +10,12 @@ export declare class MenuDesktop extends React.Component<MenuDesktopProperties>
|
|
|
10
10
|
};
|
|
11
11
|
getStyles: () => {
|
|
12
12
|
container: {
|
|
13
|
+
width: number;
|
|
14
|
+
flexShrink: number;
|
|
15
|
+
};
|
|
16
|
+
scroll: {
|
|
13
17
|
backgroundColor: string;
|
|
14
18
|
height: number;
|
|
15
|
-
width: number;
|
|
16
19
|
paddingHorizontal: number;
|
|
17
20
|
paddingVertical: number;
|
|
18
21
|
shadowOpacity: number;
|
|
@@ -12,9 +12,12 @@ class MenuDesktop extends React.Component {
|
|
|
12
12
|
const theme = (0, theme_1.getTheme)();
|
|
13
13
|
const styles = react_native_1.StyleSheet.create({
|
|
14
14
|
container: {
|
|
15
|
+
width: 250,
|
|
16
|
+
flexShrink: 0
|
|
17
|
+
},
|
|
18
|
+
scroll: {
|
|
15
19
|
backgroundColor: theme.backgroundColor1,
|
|
16
20
|
height: react_native_1.Dimensions.get('window').height - this.props.headerHeight,
|
|
17
|
-
width: 250,
|
|
18
21
|
paddingHorizontal: 15,
|
|
19
22
|
paddingVertical: 15,
|
|
20
23
|
shadowOpacity: 0.31,
|
|
@@ -29,8 +32,9 @@ class MenuDesktop extends React.Component {
|
|
|
29
32
|
const { menu, onMenuPress, isCurrentMenuPath, renderUserData } = this.props;
|
|
30
33
|
const styles = this.getStyles();
|
|
31
34
|
return (React.createElement(react_native_1.View, { style: styles.container },
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
React.createElement(react_native_1.ScrollView, { style: styles.scroll },
|
|
36
|
+
renderUserData ? React.createElement(react_native_1.View, null, renderUserData()) : null,
|
|
37
|
+
React.createElement(Menu_1.Menu, { menu: menu, isCurrentMenuPath: isCurrentMenuPath, onMenuPress: onMenuPress }))));
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
exports.MenuDesktop = MenuDesktop;
|