@open-tender/ui
Version:
A component library for use with the Open Tender web app
10 lines (9 loc) • 504 B
JavaScript
import React from 'react';
import { makeProps } from '../utils';
import Label from './Label';
const Input = ({ config, handlers, label, value, isRequired, style, labelStyle, labelConfig }) => {
const props = makeProps(config, 'input', style);
return (React.createElement(Label, { config: labelConfig, label: label, isRequired: isRequired, style: labelStyle },
React.createElement("input", Object.assign({}, props, { value: value, onChange: handlers.update }))));
};
export default Input;