UNPKG

@alifd/meet-react

Version:

Fusion Mobile React UI System Component

30 lines 2.35 kB
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } import React, { createElement } from "react"; import classNames from 'classnames'; import { Text } from "@alifd/meet-react-component-one"; import View from '../view'; var DateIndicator = function DateIndicator(props) { var _props$prefix = props.prefix, prefix = _props$prefix === void 0 ? 'mt-' : _props$prefix, highlight = props.highlight, _props$separator = props.separator, separator = _props$separator === void 0 ? ' ' : _props$separator, _props$values = props.values, values = _props$values === void 0 ? [] : _props$values; var clsPrefix = "".concat(prefix, "datepicker"); return /*#__PURE__*/React.createElement(View, { className: "".concat(clsPrefix, "-time-indicator") }, /*#__PURE__*/React.createElement(Text, { className: classNames("".concat(clsPrefix, "-time-indicator-text"), _defineProperty({}, "".concat(clsPrefix, "-time-indicator--highlight"), highlight === 0)), "x-if": highlight === 0 }, values[0]), /*#__PURE__*/React.createElement(Text, { className: "".concat(clsPrefix, "-time-indicator-text") }, separator), /*#__PURE__*/React.createElement(Text, { className: classNames("".concat(clsPrefix, "-time-indicator-text"), _defineProperty({}, "".concat(clsPrefix, "-time-indicator--highlight"), highlight === 1)), "x-if": highlight === 1 }, values[1])); }; export default DateIndicator;