@momo-kits/date-picker 0.0.13 → 0.0.23-beta-1

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from 'react-native';
7
7
  import PropTypes from 'prop-types';
8
8
  import {
9
- BottomPopupHeader, Button, Text, ScreenUtils, SwitchLanguage, Spacing
9
+ BottomPopupHeader, Button, Text, ScreenUtils, SwitchLanguage, Spacing, Colors
10
10
  } from '@momo-kits/core';
11
11
  import WheelPicker from './WheelPicker';
12
12
  import DatePickerHelper from './helper/DatePickerHelper';
@@ -26,13 +26,22 @@ const styles = StyleSheet.create({
26
26
  width: widthScreen,
27
27
  alignItems: 'center',
28
28
  justifyContent: 'center',
29
+ paddingHorizontal: 21,
30
+ paddingTop: 12
29
31
  },
30
32
  column: {
31
33
  borderWidth: 2,
32
34
  borderColor: 'red',
33
35
  },
34
36
  header: {
35
- borderRadius: 16,
37
+ borderTopLeftRadius: 12,
38
+ borderTopRightRadius: 12,
39
+ //backgroundColor:'red',
40
+ height: 64,
41
+ borderBottomColor: Colors.black_04,
42
+ borderBottomWidth: 1,
43
+ alignItems:'center',
44
+ justifyContent:'center',
36
45
  marginBottom: 0, // Spacing.S,
37
46
  },
38
47
  view: {
@@ -540,7 +549,7 @@ class DatePicker extends Component {
540
549
  renderFooter() {
541
550
  const { titleFooter, renderFooter } = this.props;
542
551
  return renderFooter ? renderFooter() : (
543
- <View style={{ paddingHorizontal: 12, marginBottom: ifIphoneX(29, 11), marginTop: 28 }}>
552
+ <View style={{ paddingHorizontal: 12, marginBottom: ifIphoneX(35, 12), marginTop: 16 }}>
544
553
  <Button
545
554
  onPress={this.finish}
546
555
  title={titleFooter || SwitchLanguage.confirm}
@@ -6,6 +6,7 @@ import {
6
6
  LinearGradient, Text, Colors, ScaleSize
7
7
  } from '@momo-kits/core';
8
8
  import ScrollCustom from './custom/ScrollCustom';
9
+ import DatePickerHelper from './helper/DatePickerHelper';
9
10
 
10
11
  const widthScreen = Dimensions.get('window').width;
11
12
  // var heightScreen = Dimensions.get('window').height;
@@ -171,19 +172,20 @@ export default class WheelPicker extends Component {
171
172
  const { items, value, width } = this.state;
172
173
  const { preFix, bottomOffset } = this.props;
173
174
  return (
174
- <View style={{ flex: 1, height: heightContain + 20 }}>
175
- <Text.SubTitle style={{
175
+ <View style={{ flex: 1, height: heightContain + 40 }}>
176
+ <Text.SubTitle weight='bold' style={{
176
177
  color: Colors.black_17, marginLeft: 6, marginBottom: 3
177
178
  }}
178
179
  >
179
- {preFix?.toUpperCase()}
180
+ {DatePickerHelper.capitalizeFirstLetter(preFix || '')}
180
181
  </Text.SubTitle>
181
182
  <View
182
183
  style={{
183
184
  flex: 1,
184
185
  height: heightContain,
185
- // backgroundColor: 'blue',
186
+ //backgroundColor: 'blue',
186
187
  marginHorizontal: 6,
188
+ paddingBottom: 20,
187
189
  borderWidth: 1,
188
190
  borderColor: Colors.black_04,
189
191
  borderRadius: 8,
@@ -194,4 +194,8 @@ export default class DatePickerHelper {
194
194
 
195
195
  return monthLength[month - 1];
196
196
  }
197
+
198
+ static capitalizeFirstLetter(string) {
199
+ return string.charAt(0).toUpperCase() + string.slice(1);
200
+ }
197
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/date-picker",
3
- "version": "0.0.13",
3
+ "version": "0.0.23-beta-1",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {},