mg-library 1.0.593 → 1.0.595

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/blocks.js CHANGED
@@ -142,7 +142,7 @@ export function MGBenefits(props) {
142
142
  data={props.benefits}
143
143
  keyExtractor={item => item.idNotice.toString()}
144
144
  renderItem={({ item }) => (
145
- <Card header={cardHeader(item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
145
+ <MGCard header={cardHeader(item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
146
146
  {item.imageUrl != undefined &&
147
147
  <View style={{ flexGrow: 1, alignItems: 'center', marginBottom: 5 }}>
148
148
  <Image source={{ uri: item.imageUrl }} style={{ width: '50%', resizeMode: 'contain', height: undefined, aspectRatio: 1 }} />
@@ -151,7 +151,7 @@ export function MGBenefits(props) {
151
151
  <View style={{ flexGrow: 1, alignItems: 'center', marginBottom: 10 }}>
152
152
  <MGText style={{ flexGrow: 1, textAlign: 'center' }}>{item.content}</MGText>
153
153
  </View>
154
- </Card>
154
+ </MGCard>
155
155
  )}
156
156
  ListHeaderComponent={listHeaderComponent}
157
157
  ListFooterComponent={listFooterComponent}
@@ -241,7 +241,7 @@ export function MGLogin(props) {
241
241
  </View>
242
242
  }
243
243
  <View>
244
- <Card style={{ flexDirection: 'column', justifyContent: 'center', alignContent: 'center', marginLeft: 30, marginRight: 30 }}
244
+ <MGCard style={{ flexDirection: 'column', justifyContent: 'center', alignContent: 'center', marginLeft: 30, marginRight: 30 }}
245
245
  header={cardHeader}
246
246
  footer={cardFooter}>
247
247
  <Controller
@@ -292,7 +292,7 @@ export function MGLogin(props) {
292
292
  )}
293
293
  name="password" />
294
294
  }
295
- </Card>
295
+ </MGCard>
296
296
  </View>
297
297
  </View>
298
298
  </Box>
@@ -332,12 +332,12 @@ export function MGCurrentAccount(props) {
332
332
  {props.goBack != undefined &&
333
333
  props.goBack
334
334
  }
335
- <Card style={{ marginHorizontal: 30, marginBottom: 10 }}>
335
+ <MGCard style={{ marginHorizontal: 30, marginBottom: 10 }}>
336
336
  <View style={{ alignItems: 'center' }}>
337
337
  <MGText category='p1'>{mgFunctionsLib.i18nString('balance', props.language)}</MGText>
338
338
  <MGText category='h3'>{props.balanceComposition.total._asCurrency(props.company.currencySymbol)}</MGText>
339
339
  </View>
340
- </Card>
340
+ </MGCard>
341
341
  </View>
342
342
  );
343
343
  return (
@@ -345,14 +345,14 @@ export function MGCurrentAccount(props) {
345
345
  data={props.balanceComposition.credits}
346
346
  keyExtractor={item => item.idCreditDueDate.toString()}
347
347
  renderItem={({ item }) => (
348
- <Card header={cardHeader(item)} footer={cardFooter(props.company, item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
348
+ <MGCard header={cardHeader(item)} footer={cardFooter(props.company, item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
349
349
  <View style={{ flexDirection: 'column' }}>
350
350
  <View>
351
351
  <MGText category='p1'>{item.description}</MGText>
352
352
  <MGText category='p2'>{props.subDescription(item)}</MGText>
353
353
  </View>
354
354
  </View>
355
- </Card>
355
+ </MGCard>
356
356
  )}
357
357
  ListHeaderComponent={listHeaderComponent}
358
358
  />
@@ -706,7 +706,7 @@ export function MGSessionHeader(props) {
706
706
  export function MGDivider() {
707
707
  return (
708
708
  <>
709
- <Divider style={{ height: 1, flexGrow: 1, alignSelf: 'stretch', backgroundColor: 'gray', marginTop: 10, marginBottom: 10 }} />
709
+ <Divider style={{ height: 1, flexGrow: 1, alignSelf: 'stretch', backgroundColor: 'gray', marginTop: 5, marginBottom: 5 }} />
710
710
  </>
711
711
  );
712
712
  }
package/components.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Text, Box } from 'native-base';
2
+ import { MGDivider } from './blocks.js';
2
3
 
3
4
  const categoryMap = {
4
5
  h1: { fontSize: '4xl', fontWeight: 'bold' },
@@ -21,7 +22,7 @@ export function MGText({ category = 'p1', style, ...props }) {
21
22
  return <Text {...styleProps} {...props} style={style} />;
22
23
  }
23
24
 
24
- export function MGCard({ children, header = null, style = {}, ...props }) {
25
+ /* export function MGCard({ children, header = null, style = {}, ...props }) {
25
26
  return (
26
27
  <Box
27
28
  borderWidth={1}
@@ -39,21 +40,21 @@ export function MGCard({ children, header = null, style = {}, ...props }) {
39
40
  {children}
40
41
  </Box>
41
42
  );
42
- }
43
+ } */
43
44
 
44
- export default function MGCard({ children, header = null, footer = null, style = {}, ...props }) {
45
+ export function MGCard({ children, header = null, footer = null, style = {}, ...props }) {
45
46
  return (
46
47
  <Box borderWidth={1} borderColor="coolGray.200" borderRadius="md" bg="white" shadow={2} overflow="hidden" mb={4} mx={2} style={style} {...props}>
47
48
  {header && (
48
49
  <>
49
50
  <Box p={4}>{header}</Box>
50
- <Divider />
51
+ <MGDivider />
51
52
  </>
52
53
  )}
53
54
  <Box p={4}>{children}</Box>
54
55
  {footer && (
55
56
  <>
56
- <Divider />
57
+ <MGDivider />
57
58
  <Box p={4}>{footer}</Box>
58
59
  </>
59
60
  )}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.593",
3
+ "version": "1.0.595",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {