Initial commit. Functional approach
This commit is contained in:
20
src/components/MethodsInput.jsx
Normal file
20
src/components/MethodsInput.jsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
|
||||
const makeInputJSON = (dictArgs) => {
|
||||
const {id, name, value = null, textLabel = null, type = null, placeholder = null, stepValue = null, minValue = null, options = null, onChange = null} = dictArgs;
|
||||
return {
|
||||
id: id,
|
||||
name: name,
|
||||
value: value,
|
||||
textLabel: textLabel,
|
||||
type: type,
|
||||
placeholder: placeholder,
|
||||
stepValue: stepValue,
|
||||
minValue: minValue,
|
||||
options: options,
|
||||
onChange: onChange
|
||||
};
|
||||
};
|
||||
|
||||
const methods = { makeInputJSON }
|
||||
export default methods;
|
||||
Reference in New Issue
Block a user