UNPKG

mr-component

Version:
47 lines 1.82 kB
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; var _excluded = ["type", "size", "color", "textColor", "plain", "round", "mark", "closeable", "onClick", "onClose", "style", "className", "children"]; import * as React from 'react'; import { forwardRef } from 'react'; import { Tag } from 'react-vant'; var VantTag = function VantTag(props, ref) { var _props$type = props.type, type = _props$type === void 0 ? 'default' : _props$type, _props$size = props.size, size = _props$size === void 0 ? 'medium' : _props$size, color = props.color, textColor = props.textColor, _props$plain = props.plain, plain = _props$plain === void 0 ? false : _props$plain, _props$round = props.round, round = _props$round === void 0 ? false : _props$round, _props$mark = props.mark, mark = _props$mark === void 0 ? false : _props$mark, _props$closeable = props.closeable, closeable = _props$closeable === void 0 ? false : _props$closeable, onClick = props.onClick, onClose = props.onClose, style = props.style, className = props.className, _props$children = props.children, children = _props$children === void 0 ? '标签' : _props$children, others = _objectWithoutPropertiesLoose(props, _excluded); return /*#__PURE__*/React.createElement(Tag, _extends({ ref: ref, type: type, size: size, color: color, textColor: textColor, plain: plain, round: round, mark: mark, closeable: closeable, onClick: onClick, onClose: onClose, style: style, className: className }, others), children); }; var RefVantTag = /*#__PURE__*/forwardRef(VantTag); RefVantTag.displayName = 'VantTag'; export default RefVantTag;