@zohodesk/components
Version:
In this Package, we Provide Some Basic Components to Build Web App
32 lines (28 loc) • 923 B
JavaScript
/* eslint-disable react/forbid-component-props */
/** ** Libraries *** */
import React, { PureComponent } from 'react';
import { DaysRow_propTypes } from "./props/propTypes";
/** ** CSS *** */
import style from "./DateTime.module.css";
/** ** Components *** */
import { Container, Box } from "../Layout";
export default class DaysRow extends PureComponent {
render() {
const {
dayNames,
dayNamesShort,
holidays
} = this.props;
return /*#__PURE__*/React.createElement(Container, {
alignBox: "row",
align: "center",
className: style.days
}, dayNames.map((dayName, index) => /*#__PURE__*/React.createElement(Box, {
key: dayName,
className: `${style.daysStr} ${style.grid} ${holidays.includes(index) ? style.holiday : ''}`,
"data-title": dayName,
"aria-label": dayName
}, dayNamesShort[index])));
}
}
DaysRow.propTypes = DaysRow_propTypes;