mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-27 16:37:42 +00:00
26 lines
589 B
JavaScript
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 }}
|
|
/>
|
|
);
|
|
};
|