anephenix/ui

View on GitHub
src/components/input/Input.jsx

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
import React, { forwardRef } from 'react';

const Input = forwardRef(function input(
    { type = 'text', className, defaultValue, placeholder, name, onChange },
    ref
) {
    return (
        <input
            ref={ref}
            name={name}
            type={type}
            className={className}
            defaultValue={defaultValue}
            onChange={onChange}
            placeholder={placeholder}
        />
    );
});

export default Input;