react-native-boxes 1.4.89 → 1.4.90

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Message.tsx +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.89",
3
+ "version": "1.4.90",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Message.tsx CHANGED
@@ -36,17 +36,19 @@ export function AlertMessage(props:
36
36
  'warning': '#FFC107',
37
37
  'critical': '#F44336'
38
38
  }[type];
39
-
39
+ let colorType = theme.colors[type] || color
40
+ let textColor = theme.name != 'dark' && type == 'warning' ? theme.colors.text : colorType;
40
41
  if (!props.text || props.text.length < 1) {
41
42
  return undefined
42
43
  }
43
44
 
44
45
  return (
45
46
  <HBox style={[{
46
- flex: 1,
47
47
  minHeight: isDesktop() ? undefined : '10%',
48
48
  margin: theme.dimens.space.sm,
49
- backgroundColor: theme.colors[type] || color,
49
+ borderColor: colorType,
50
+ borderWidth: theme.dimens.space.xs,
51
+ backgroundColor: colorType + "1A",
50
52
  alignItems: 'center',
51
53
  justifyContent: 'space-between',
52
54
  flexDirection: 'row',
@@ -56,7 +58,7 @@ export function AlertMessage(props:
56
58
  theme.dimens.space.lg : theme.dimens.space.md,
57
59
  paddingTop: props.text.length > 40 && Platform.OS == 'web' ?
58
60
  theme.dimens.space.lg : theme.dimens.space.md,
59
- borderRadius: theme.dimens.space.sm,
61
+ borderRadius: theme.dimens.space.md,
60
62
  }, props.style]}>
61
63
 
62
64
  <HBox style={{
@@ -69,11 +71,11 @@ export function AlertMessage(props:
69
71
  }}
70
72
  name={icon}
71
73
  size={theme.dimens.icon.md}
72
- color={props.color || theme.colors.invert.text} />
74
+ color={props.color || textColor} />
73
75
  <TextView style={{
74
76
  flexShrink: 1,
75
77
  padding: 0,
76
- color: props.color || theme.colors.invert.text,
78
+ color: props.color || textColor,
77
79
  }}>{props.text}
78
80
  </TextView>
79
81
  </HBox>
@@ -89,7 +91,7 @@ export function AlertMessage(props:
89
91
  }}>
90
92
  <FontAwesome name={'close'}
91
93
  size={theme.dimens.icon.md}
92
- color={theme.colors.invert.text} />
94
+ color={theme.colors.text} />
93
95
  </Pressable>
94
96
  }
95
97
  </HBox>