/**
* A text field with a label that reacts to an onFieldChange event.
*
* @example
* field = {
* "id": 140,
* "attribute_name": "website_url",
* "description": null,
* "input_type": "text_input",
* "label": "Webiste URL",
* "placeholder_text": ""
*}
*
*
* Note:
* field is an json object that will contain the following attributes: attribute_name, placeholder_text, description, label.
*/
import { h } from 'preact';
import PropTypes from 'prop-types';
import { FormField } from '@crayons';
function TextInput(props) {
const { onFieldChange } = props;
const { attribute_name, placeholder_text, description, label } = props.field;
return (
{description &&