epn-ui
Version:
Дизайн система кабинета ВМ
17 lines (14 loc) • 1.18 kB
JavaScript
import React from 'react';
import clsx from 'clsx';
import Input from 'antd/lib/input';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faEye } from '@fortawesome/pro-regular-svg-icons/faEye';
import { faEyeSlash } from '@fortawesome/pro-regular-svg-icons/faEyeSlash';
var Password = Input.Password;
var InputTextPassword = function (_a) {
var className = _a.className, id = _a.id, defaultValue = _a.defaultValue, maxLength = _a.maxLength, showCount = _a.showCount, value = _a.value, placeholder = _a.placeholder, disabled = _a.disabled, prefix = _a.prefix, onPressEnter = _a.onPressEnter, onChange = _a.onChange;
return (React.createElement(Password, { id: id, className: clsx('epn-inputText', className), defaultValue: defaultValue, maxLength: maxLength, showCount: showCount, value: value, placeholder: placeholder, disabled: disabled, prefix: prefix, iconRender: function (visible) {
return visible ? React.createElement(FontAwesomeIcon, { icon: faEye }) : React.createElement(FontAwesomeIcon, { icon: faEyeSlash });
}, onPressEnter: onPressEnter, onChange: onChange }));
};
export { InputTextPassword as default };