-
Notifications
You must be signed in to change notification settings - Fork 95
/
mockProps.js
79 lines (72 loc) · 1.52 KB
/
mockProps.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
'use strict';
var React = require('react');
var ReactNative = require('react-native');
var PropTypes = require('prop-types');
var createReactClass = require('create-react-class');
var {
View,
ViewPropTypes
} = ReactNative;
var ViewStylePropTypes = ViewPropTypes ? ViewPropTypes.style : View.propTypes.style;
var BasicMarker = createReactClass({
propTypes: {
pressed: PropTypes.bool,
pressedMarkerStyle: ViewStylePropTypes,
markerStyle: ViewStylePropTypes
},
render: function () {
return (
<View
style={[this.props.markerStyle, this.props.pressed && this.props.pressedMarkerStyle]}
/>
);
}
});
var mockProps = {
values: [0],
onValuesChangeStart: function () {
console.log('press started');
},
onValuesChange: function (values) {
console.log('changing', values);
},
onValuesChangeFinish: function (values) {
console.log('changed', values);
},
step: 1,
min:0,
max:10,
selectedStyle: {
backgroundColor: 'blue'
},
unselectedStyle: {
backgroundColor: 'grey'
},
containerStyle: {
height:30,
},
trackStyle: {
height:7,
borderRadius: 3.5,
},
touchDimensions: {
height: 30,
width: 30,
borderRadius: 15,
slipDisplacement: 30,
},
markerStyle: {
height:30,
width: 30,
borderRadius: 15,
backgroundColor:'#E8E8E8',
borderWidth: 0.5,
borderColor: 'grey',
},
customMarker: BasicMarker,
pressedMarkerStyle: {
backgroundColor:'#D3D3D3',
},
sliderLength: 280
};
module.exports = mockProps;