@olea-bps/base 1.1.6 → 1.1.8
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.
|
@@ -32,14 +32,15 @@ import {
|
|
|
32
32
|
Headline,
|
|
33
33
|
List,
|
|
34
34
|
useTheme,
|
|
35
|
-
} from
|
|
35
|
+
} from 'react-native-paper';
|
|
36
36
|
|
|
37
|
-
import { useTranslation } from
|
|
37
|
+
import { useTranslation } from 'react-i18next';
|
|
38
38
|
|
|
39
|
-
import componentStyles from './styles';
|
|
40
39
|
import AppbarComponent from '../AppBar';
|
|
41
40
|
import AppbarAction from '../AppbarAction';
|
|
42
|
-
import
|
|
41
|
+
import IconListItem from '../IconListItem';
|
|
42
|
+
|
|
43
|
+
import componentStyles from './styles';
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* Contact Detail Component
|
|
@@ -191,12 +192,12 @@ export default function ContactDetailComponent({ contact, ...restProps }) {
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
>
|
|
194
|
-
<
|
|
195
|
+
<IconListItem
|
|
195
196
|
title={title}
|
|
196
197
|
description={telephoneNumber}
|
|
197
198
|
descriptionStyle={themeStyles.textLighter}
|
|
198
199
|
titleStyle={themeStyles.searchDetailTitle}
|
|
199
|
-
|
|
200
|
+
icon={'call'}
|
|
200
201
|
/>
|
|
201
202
|
</TouchableOpacity>
|
|
202
203
|
)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCallback,
|
|
3
|
+
useMemo,
|
|
4
|
+
} from 'react';
|
|
5
|
+
import {
|
|
6
|
+
StyleSheet,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
List,
|
|
11
|
+
useTheme,
|
|
12
|
+
} from 'react-native-paper';
|
|
13
|
+
|
|
14
|
+
import { default as Icon } from '../../libraries/icons-openasist';
|
|
15
|
+
|
|
16
|
+
import componentStyles from './styles';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Ein Listenelement, welches ein Icon auf der rechten Seite anzeigt.
|
|
20
|
+
* Es können alle Properties der {@link List.Item}-Komponente verwendet werden, außer die `right`-Property.
|
|
21
|
+
* Die `right`-Property wird für das Einbinden des Icons benutzt.
|
|
22
|
+
*
|
|
23
|
+
* @param {object} props
|
|
24
|
+
* @param {string} props.icon Iconname des anzuzeigenen Icons. Für mögliche Werte siehe {@link Icon}
|
|
25
|
+
*/
|
|
26
|
+
export default function IconListItem({ icon, ...listItemProps }) {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
|
|
29
|
+
const styles = useMemo(
|
|
30
|
+
() => StyleSheet.create(componentStyles(theme)),
|
|
31
|
+
[theme, componentStyles]
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const listItemIcon = useCallback(
|
|
35
|
+
listIconProps =>
|
|
36
|
+
<List.Icon
|
|
37
|
+
{...listIconProps}
|
|
38
|
+
icon={
|
|
39
|
+
props =>
|
|
40
|
+
<Icon
|
|
41
|
+
{...props}
|
|
42
|
+
icon={icon}
|
|
43
|
+
/>
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
,
|
|
47
|
+
[icon]
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<List.Item
|
|
52
|
+
{...listItemProps}
|
|
53
|
+
right={listItemIcon}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import {Dimensions} from
|
|
1
|
+
import { Dimensions } from 'react-native'
|
|
2
2
|
|
|
3
|
-
export default function(theme) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
3
|
+
export default function (theme) {
|
|
4
|
+
const height = Dimensions.get('window').height
|
|
5
|
+
const width = Dimensions.get('window').width
|
|
6
|
+
return {
|
|
7
|
+
overflow: {
|
|
8
|
+
backgroundColor: theme.colors.overlayColor
|
|
9
|
+
},
|
|
10
|
+
image: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 0,
|
|
13
|
+
left: 0,
|
|
14
|
+
right: 0,
|
|
15
|
+
width: null,
|
|
16
|
+
resizeMode: 'cover'
|
|
17
|
+
},
|
|
18
|
+
container: {
|
|
19
|
+
flex: 1,
|
|
20
|
+
overflow: 'hidden'
|
|
21
|
+
},
|
|
22
|
+
containerInner: {
|
|
23
|
+
flex: 1
|
|
24
|
+
},
|
|
25
|
+
containerContent: {
|
|
26
|
+
backgroundColor: theme.colors.contentBackground,
|
|
27
|
+
flex: 1,
|
|
28
|
+
paddingHorizontal: 5,
|
|
29
|
+
paddingVertical: 20,
|
|
30
|
+
minHeight: height // enough space for short news without excessive whitespace
|
|
31
|
+
},
|
|
32
|
+
activity: {
|
|
33
|
+
marginTop: 20
|
|
34
|
+
},
|
|
35
|
+
badges: {
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
flexWrap: 'wrap',
|
|
38
|
+
paddingHorizontal: 10
|
|
39
|
+
},
|
|
40
|
+
badge: {
|
|
41
|
+
marginRight: 5,
|
|
42
|
+
marginBottom: 5
|
|
43
|
+
},
|
|
44
|
+
title: {
|
|
45
|
+
paddingLeft: 10,
|
|
46
|
+
fontSize: theme.fontSizes.title,
|
|
47
|
+
lineHeight: theme.lineHeights.titleBig
|
|
48
|
+
},
|
|
49
|
+
bar: {
|
|
50
|
+
alignItems: 'flex-start',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
top: 5,
|
|
54
|
+
left: 0,
|
|
55
|
+
right: 0
|
|
56
|
+
},
|
|
57
|
+
barText: {
|
|
58
|
+
color: theme.colors.primaryText,
|
|
59
|
+
...theme.fonts.bold
|
|
60
|
+
},
|
|
61
|
+
newsContent: {
|
|
62
|
+
marginVertical: theme.paddings.default,
|
|
63
|
+
marginHorizontal: theme.paddings.small,
|
|
64
|
+
width: width - (2 * theme.paddings.small)
|
|
65
|
+
},
|
|
66
|
+
newsContentText: {
|
|
67
|
+
fontSize: theme.fontSizes.m
|
|
68
|
+
},
|
|
69
|
+
imageDesc: {
|
|
70
|
+
backgroundColor: theme.colors.overlayColor,
|
|
71
|
+
color: theme.colors.primaryText,
|
|
72
|
+
paddingVertical: 2,
|
|
73
|
+
paddingHorizontal: theme.paddings.small,
|
|
74
|
+
fontSize: theme.fontSizes.xs
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
77
|
}
|
package/package.json
CHANGED
package/views/Search/index.js
CHANGED
|
@@ -123,9 +123,7 @@ function SearchView(props) {
|
|
|
123
123
|
onSubmitEditing={() => _onPressButton()}
|
|
124
124
|
onIconPress={() => _onPressButton()}
|
|
125
125
|
onChangeText={setSearchString}
|
|
126
|
-
icon={
|
|
127
|
-
<IconsOpenasist icon={"search"} size={32} color={colors.icon} />
|
|
128
|
-
}
|
|
126
|
+
icon={props => <IconsOpenasist {...props} icon={'search'} color={colors.icon} />}
|
|
129
127
|
style={styles.searchBar}
|
|
130
128
|
inputStyle={styles.searchBarInput}
|
|
131
129
|
value={searchString}
|