@lunit/oui
Version:
Lunit Oncology UI components
17 lines (16 loc) • 648 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import PasswordInput from './components/PasswordInput';
import NormalTextInput from './components/NormalTextInput';
import { isPasswordInput, isFileInput } from './TextInput.utils';
import FileInput from './components/FileInput';
const TextInput = forwardRef((props, ref) => {
if (isPasswordInput(props)) {
return (_jsx(PasswordInput, { ...props, ref: ref }));
}
if (isFileInput(props)) {
return (_jsx(FileInput, { ...props, ref: ref }));
}
return (_jsx(NormalTextInput, { ...props, ref: ref }));
});
export default TextInput;