Port View node to react. Fixes #6637

This commit is contained in:
Nikhil Mohite
2021-07-26 11:19:19 +05:30
committed by Akshay Joshi
parent 6d18842dd3
commit d9cfbf592e
8 changed files with 388 additions and 12 deletions

View File

@@ -155,12 +155,16 @@ InputSQL.propTypes = {
};
export function FormInputSQL({hasError, required, label, className, helpMessage, testcid, value, controlProps, ...props}) {
return (
<FormInput required={required} label={label} error={hasError} className={className} helpMessage={helpMessage} testcid={testcid} >
<InputSQL value={value} options={controlProps} {...props}/>
</FormInput>
);
export function FormInputSQL({hasError, required, label, className, helpMessage, testcid, value, controlProps, noLabel, ...props}) {
if(noLabel) {
return <InputSQL value={value} options={controlProps} {...props}/>;
} else {
return (
<FormInput required={required} label={label} error={hasError} className={className} helpMessage={helpMessage} testcid={testcid} >
<InputSQL value={value} options={controlProps} {...props}/>
</FormInput>
);
}
}
FormInputSQL.propTypes = {
hasError: PropTypes.bool,