## Usage

```jsx
import InputForm from "./input";

<InputForm
  onChange={(value) => console.log(value)}
  placeholder="Enter input"
/>;
```

To use React input forms, you can simply add the input field inside the form tag. You want to import
the required file from paths first.

```sh
import React, { useState } from "react";

import { Input } from "antd";

export default function InputComponent({
  className,
  disabled,
  onChange,
  type,
  maxLength,
  placeholder,
  readOnly,
  value,
  mode = "capitalize",
}) {
  /**
   *  Function to transform entered value according to mode
   *
   * @param {*} mode
   * @param {*} e
   */
  const onTransform = (mode, e) => {
    var transformedValue;

    // Transforms value according to mode selected
    if (mode === "lowercase") {
      transformedValue = e.target.value.toLowerCase();
    } else if (mode === "uppercase") {
      transformedValue = e.target.value.toUpperCase();
    } else {
      transformedValue = capitalizeFirstLetter(e.target.value);
    }

    onChange(transformedValue);
  };

  /**
   *  To capitalize first character only
   * @param {*} string
   * @returns
   */


  function capitalizeFirstLetter(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);
  }

  return (
    <Input
      type="text"
      autoComplete="off" // Changed "autocomplete" to "autoComplete" (camelCase)
      className={className}
      placeholder={placeholder}
      disabled={disabled}
      onChange={(e) => onTransform(mode, e)}
      maxLength={maxLength}
      readOnly={readOnly}
      value={value}
    />
  );

```
