UNPKG

@cainiaofe/cn-ui-m

Version:
11 lines (10 loc) 715 B
import { __assign, __rest } from "tslib"; import classNames from 'classnames'; import * as React from 'react'; import isString from 'lodash/isString'; var ListItemCaption = function (props) { var _a = props.prefix, prefix = _a === void 0 ? 'cn-ui-m-' : _a, children = props.children, className = props.className, others = __rest(props, ["prefix", "children", "className"]); var newClassName = classNames("".concat(prefix, "list-item-caption"), className); return isString(children) ? (React.createElement("span", __assign({}, others, { className: newClassName }), children)) : (React.createElement("div", __assign({}, others, { className: newClassName }), children)); }; export default ListItemCaption;