UNPKG

@ant-design/pro-flow

Version:
36 lines 2.13 kB
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["className", "type"], _excluded2 = ["className", "type"]; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { Input as AntInput } from 'antd'; import { forwardRef, memo } from 'react'; import { useStyles } from "./style"; import { jsx as _jsx } from "react/jsx-runtime"; export var Input = /*#__PURE__*/forwardRef(function (_ref, ref) { var className = _ref.className, _ref$type = _ref.type, type = _ref$type === void 0 ? 'ghost' : _ref$type, props = _objectWithoutProperties(_ref, _excluded); var _useStyles = useStyles(), styles = _useStyles.styles, cx = _useStyles.cx; return /*#__PURE__*/_jsx(AntInput, _objectSpread({ className: cx(styles.input, type === 'block' && styles.block, className), ref: ref }, props)); }); export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) { var className = _ref2.className, _ref2$type = _ref2.type, type = _ref2$type === void 0 ? 'ghost' : _ref2$type, props = _objectWithoutProperties(_ref2, _excluded2); var _useStyles2 = useStyles(), styles = _useStyles2.styles, cx = _useStyles2.cx; return /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({ className: cx(styles.textarea, type === 'block' && styles.block, className), ref: ref }, props)); }));