import React from 'react';
import { Form, Input } from 'antd';
import type { RuleObject } from 'rc-field-form/lib/interface';
type RuleConfig = RuleObject
interface PasswordInputProps {
    name: string
    label: string
    rules?: RuleConfig[] | undefined
}

const PasswordInput: React.FC<PasswordInputProps> = ({ name, label, rules, ...rest }) => {
  return (
    <Form.Item label={label} name={name} rules={rules}>
      <Input.Password {...rest} />
    </Form.Item>
  );
};

export default PasswordInput;
