UNPKG

@alifd/meet-react

Version:

Fusion Mobile React UI System Component

21 lines 1.23 kB
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import { __rest } from "tslib"; import classNames from 'classnames'; import React, { createElement } from "react"; import { Text } from "@alifd/meet-react-component-one"; import View from '../../view'; import { isString } from '../../utils'; var ListItemCaption = function ListItemCaption(props) { var _props$prefix = props.prefix, prefix = _props$prefix === void 0 ? 'mt-' : _props$prefix, children = props.children, className = props.className, others = __rest(props, ["prefix", "children", "className"]); var newClassName = classNames("".concat(prefix, "list-item-caption"), className); return isString(children) ? /*#__PURE__*/React.createElement(Text, _extends({}, others, { className: newClassName }), children) : /*#__PURE__*/React.createElement(View, _extends({}, others, { className: newClassName }), children); }; export default ListItemCaption;