33 |
34 |
45 | {orderLabel}
46 |
47 |
48 |
49 | );
50 |
51 | OrderHandle.propTypes = {
52 | theme: PropTypes.shape().isRequired,
53 | handle: PropTypes.string.isRequired,
54 | titleOnly: PropTypes.bool.isRequired,
55 | panHandlers: PropTypes.shape(),
56 | orderLabel: PropTypes.node.isRequired,
57 | orderStyle: ViewPropTypes.style,
58 | };
59 |
60 | OrderHandle.defaultProps = {
61 | panHandlers: null,
62 | orderStyle: null,
63 | };
64 |
65 | export default OrderHandle;
66 |
--------------------------------------------------------------------------------
/src/widgets/ArrayWidget/RemoveHandle.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { StyleSheet, Text, Platform } from 'react-native';
4 | import { ViewPropTypes } from 'deprecated-react-native-prop-types';
5 |
6 | const styles = StyleSheet.create({
7 | remove: {
8 | paddingLeft: 10,
9 | paddingTop: 11,
10 | fontSize: 11,
11 | fontWeight: '600',
12 | ...Platform.select(
13 | {
14 | ios: {
15 | color: '#007AFF',
16 | },
17 | android: {
18 | color: '#7489A8',
19 | fontFamily: 'Roboto-Medium',
20 | },
21 | },
22 | ),
23 | },
24 | hidden: {
25 | opacity: 0,
26 | paddingTop: 0,
27 | },
28 | alignRight: {
29 | paddingTop: 0,
30 | width: '100%',
31 | textAlign: 'right',
32 | },
33 | });
34 |
35 | const RemoveHandle = ({
36 | theme,
37 | onRemovePress,
38 | titleOnly,
39 | removeLabel,
40 | removeStyle,
41 | }) => {
42 | if (!titleOnly) {
43 | return (
44 |