@ledvance/base 1.1.53 → 1.1.54
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
|
@@ -6,7 +6,7 @@ import Spacer from './Spacer'
|
|
|
6
6
|
const cx = Utils.RatioUtils.convertX
|
|
7
7
|
|
|
8
8
|
interface InfoTextProps extends ViewProps {
|
|
9
|
-
icon: string
|
|
9
|
+
icon: string | number
|
|
10
10
|
text: string
|
|
11
11
|
contentColor?: string
|
|
12
12
|
iconStyle?: StyleProp<ImageStyle>
|
|
@@ -15,10 +15,11 @@ interface InfoTextProps extends ViewProps {
|
|
|
15
15
|
|
|
16
16
|
const InfoText = (props: InfoTextProps) => {
|
|
17
17
|
const contentColor = props.contentColor || '#666666'
|
|
18
|
+
const source = typeof props.icon === 'string' ? {uri: props.icon} : props.icon
|
|
18
19
|
return (
|
|
19
20
|
<View style={styles.root}>
|
|
20
21
|
<Image style={[styles.icon, props.iconStyle, {tintColor: contentColor}]}
|
|
21
|
-
source={
|
|
22
|
+
source={source}/>
|
|
22
23
|
<Spacer width={cx(4)} height={0}/>
|
|
23
24
|
<Text style={[styles.text, props.textStyle, {color: contentColor}]}>{props.text}</Text>
|
|
24
25
|
</View>
|