@s-ui/react-atom-input
Version:
> Inputs are the text fields that users fill in with different types of information. These include dates, passwords or even short answers. It’s a field where users can write alphanumeric texts.
22 lines • 692 B
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["type"];
import Input from '../Input/index.js';
import Mask from '../Mask/index.js';
import Password from '../Password/index.js';
export default (function (_ref) {
var type = _ref.type,
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
switch (type) {
case 'sui-password':
return [Password, _extends({}, rest, {
type: type
})];
case 'mask':
return [Mask, _extends({}, rest)];
default:
return [Input, _extends({}, rest, {
type: type
})];
}
});