react-native-persian-calendar-modal
Version:
Persian Calendar Modal Component for React Native
38 lines (30 loc) • 832 B
JavaScript
/**
* Persian Calendar Picker Component
*
* Copyright 2016 Reza (github.com/rghorbani)
* Licensed under the terms of the MIT license. See LICENSE file in the project root for terms.
*/
;
const React = require('react');
import {View,Text} from 'native-base';
const Utils = require('./utils');
function Weekdays(props) {
const { styles, startFromMonday, weekdays, textStyle } = props;
let wd = weekdays;
if (!wd) {
wd = startFromMonday ? Utils.WEEKDAYS_MON : Utils.WEEKDAYS; // English Week days Array
}
return (
<View style={styles.dayLabelsWrapper}>
{wd.map((day, key) => {
return (
<Text key={key} style={[styles.dayLabels, textStyle]}>
{day}
</Text>
);
})}
</View>
);
}
Weekdays.propTypes = {};
module.exports = Weekdays;