import React, { forwardRef } from "react";
import { Input } from "antd";

export default forwardRef(({ maxLen, ...props }, ref) => {
    const len = !props.value ? 0 : props.value.length;
    return <Input {...props} suffix={<span>{`${len}/${maxLen}`}</span>} ref={ref} />
});