Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support arabic lang #351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 40 additions & 41 deletions CalendarPicker/Controls.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
import React from 'react';
import {
View,
TouchableOpacity,
Text,
} from 'react-native';
import PropTypes from 'prop-types';

export default function Controls(props) {
const {
styles,
textStyles,
label,
component,
onPressControl,
disabled,
} = props;

return (
<TouchableOpacity
onPress={() => onPressControl()}
style={styles}
disabled={disabled}
hitSlop={{ top: 20, bottom: 20, left: 40, right: 40 }}
>
<View style={{opacity: disabled ? 0 : 1}}>
{ component ||
<Text style={[textStyles]}>
{ label }
</Text>
}
</View>
</TouchableOpacity>
);
}

Controls.propTypes = {
styles: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
label: PropTypes.string,
onPressControl: PropTypes.func.isRequired,
};
import React from 'react';
import {
TouchableOpacity,
Text,
} from 'react-native';
import PropTypes from 'prop-types';

export default function Controls(props) {
const {
styles,
textStyles,
label,
component,
onPressControl,
disabled,
} = props;

return (
<TouchableOpacity
onPress={() => onPressControl()}
style={styles}
disabled={disabled}
hitSlop={{ top: 20, bottom: 20, left: 40, right: 40 }}
>
{ component ?
( disabled ? null : component )
:
<Text style={[textStyles]}>
{ disabled ? null : label }
</Text>
}
</TouchableOpacity>
);
}

Controls.propTypes = {
styles: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
label: PropTypes.string,
onPressControl: PropTypes.func.isRequired,
};
Loading