ToolJet/frontend/src/Editor/Components/TextInput.jsx
Navaneeth Pk 8b481ae9f4
ESLint fixes (#138)
* ESLint fixes

* Eslinted
2021-04-30 13:40:57 +05:30

26 lines
589 B
JavaScript

import React from 'react';
export const TextInput = function TextInput({
id,
width,
height,
component,
onComponentClick,
currentState,
onComponentOptionChanged
}) {
console.log('currentState', currentState);
const placeholder = component.definition.properties.placeholder.value;
return (
<input
onClick={() => onComponentClick(id, component)}
onChange={(e) => onComponentOptionChanged(component, 'value', e.target.value)}
type="text"
className="form-control"
placeholder={placeholder}
style={{ width, height }}
/>
);
};