@momo-kits/calendar 0.0.55-beta.4 → 0.0.55-beta.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/calendar",
3
- "version": "0.0.55-beta.4",
3
+ "version": "0.0.55-beta.6",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {
package/src/Calendar.js CHANGED
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import React, { Component } from 'react';
3
3
  import { View, ScrollView, Platform, StyleSheet } from 'react-native';
4
4
  import moment from 'moment';
5
- import { Text, SwitchLanguage, Colors, Spacing } from '@momo-kits/core';
5
+ import { Text, SwitchLanguage, Colors, Spacing, Radius } from '@momo-kits/core';
6
6
  import Switch from '@momo-kits/switch';
7
7
  import CalendarPro from './CalendarPro';
8
8
  import TabHeader from './TabHeader';
@@ -419,9 +419,15 @@ class Calendar extends Component {
419
419
  } = this.props;
420
420
  const { isDoubleDateMode } = this.state;
421
421
  return (
422
- <ScrollView style={{ flex: 1, backgroundColor: 'white' }}>
423
- {!isHiddenSwitch && this.renderSwitchReturnSelection()}
424
- {!isHideHeaderPanel && this.renderHeaderPanel()}
422
+ <ScrollView style={{ flex: 1, backgroundColor: 'transparent' }}>
423
+ <View
424
+ style={{
425
+ backgroundColor: Colors.black_01,
426
+ borderRadius: Radius.XS,
427
+ }}>
428
+ {!isHiddenSwitch && this.renderSwitchReturnSelection()}
429
+ {!isHideHeaderPanel && this.renderHeaderPanel()}
430
+ </View>
425
431
  <CalendarPro
426
432
  ref={this.calendarPicker}
427
433
  startDate={doubleDate?.first}
@@ -18,6 +18,7 @@ import {
18
18
  Image,
19
19
  IconSource,
20
20
  Spacing,
21
+ Radius,
21
22
  } from '@momo-kits/core';
22
23
  import MonthList from './MonthList';
23
24
  import HeaderControl from './HeaderControl';
@@ -250,44 +251,46 @@ export default class CalendarPro extends Component {
250
251
  onPressNextArrow={this.onPressNextArrow}
251
252
  />
252
253
  <View style={styles.blueSeperator} />
253
- <View style={styles.viewDay}>
254
- {[1, 2, 3, 4, 5, 6, 7].map((item) => (
255
- <Text
256
- style={[
257
- styles.textDay,
258
- {
259
- color:
260
- item === 6 || item === 7
261
- ? Colors.red_05
262
- : Colors.black_12,
263
- },
264
- ]}
265
- key={item}>
266
- {Util.mapWeeKDate(item)}
267
- </Text>
268
- ))}
254
+ <View style={{ paddingHorizontal: Spacing.M }}>
255
+ <View style={styles.viewDay}>
256
+ {[1, 2, 3, 4, 5, 6, 7].map((item) => (
257
+ <Text
258
+ style={[
259
+ styles.textDay,
260
+ {
261
+ color:
262
+ item === 6 || item === 7
263
+ ? Colors.red_05
264
+ : Colors.black_12,
265
+ },
266
+ ]}
267
+ key={item}>
268
+ {Util.mapWeeKDate(item)}
269
+ </Text>
270
+ ))}
271
+ </View>
272
+ <MonthList
273
+ ref="MonthList"
274
+ today={this.today}
275
+ minDate={this.minDate}
276
+ maxDate={this.maxDate}
277
+ startDate={startDate}
278
+ endDate={endDate}
279
+ onChoose={this.onChoose}
280
+ i18n={i18n}
281
+ onScrollCalendar={this.onScrollCalendar}
282
+ isShowLunar={!isOffLunar && showLunar}
283
+ isDoubleDateMode={isDoubleDateMode}
284
+ tabSelected={tabSelected}
285
+ lunarConverter={this.converter}
286
+ holidays={holidays}
287
+ selectedDate={this.selectedDate}
288
+ priceList={priceListFormat}
289
+ labelFrom={labelFrom}
290
+ labelTo={labelTo}
291
+ isHideLabel={isHideLabel}
292
+ />
269
293
  </View>
270
- <MonthList
271
- ref="MonthList"
272
- today={this.today}
273
- minDate={this.minDate}
274
- maxDate={this.maxDate}
275
- startDate={startDate}
276
- endDate={endDate}
277
- onChoose={this.onChoose}
278
- i18n={i18n}
279
- onScrollCalendar={this.onScrollCalendar}
280
- isShowLunar={!isOffLunar && showLunar}
281
- isDoubleDateMode={isDoubleDateMode}
282
- tabSelected={tabSelected}
283
- lunarConverter={this.converter}
284
- holidays={holidays}
285
- selectedDate={this.selectedDate}
286
- priceList={priceListFormat}
287
- labelFrom={labelFrom}
288
- labelTo={labelTo}
289
- isHideLabel={isHideLabel}
290
- />
291
294
  </View>
292
295
  {!isOffLunar && (
293
296
  <View style={styles.viewLunar}>
@@ -409,7 +412,7 @@ const styles = StyleSheet.create({
409
412
  borderStyle: 'solid',
410
413
  borderColor: '#c7c7cd',
411
414
  },
412
- viewDate: { paddingHorizontal: 12 },
415
+ viewDate: {},
413
416
  textDay: {
414
417
  // fontSize: 14,
415
418
  lineHeight: 16,
@@ -424,7 +427,12 @@ const styles = StyleSheet.create({
424
427
  paddingTop: 15,
425
428
  paddingBottom: 10,
426
429
  },
427
- container: { flex: 1, backgroundColor: 'white', marginTop: 20 },
430
+ container: {
431
+ flex: 1,
432
+ backgroundColor: 'white',
433
+ marginTop: Spacing.S,
434
+ borderRadius: Radius.XS,
435
+ },
428
436
  blueSeperator: {
429
437
  height: 1,
430
438
  width: '100%',