Few more UI changes for Note.

This commit is contained in:
Aditya Toshniwal 2021-07-29 18:30:20 +05:30 committed by Akshay Joshi
parent 0998ddefa2
commit 1810d810d8
2 changed files with 8 additions and 6 deletions

View File

@ -92,7 +92,7 @@ function MappedFormControlBase({type, value, id, onChange, className, visible, i
case 'sql':
return <FormInputSQL name={name} value={value} onChange={onSqlChange} className={className} noLabel={noLabel} {...props} />;
case 'note':
return <FormNote {...props}/>;
return <FormNote className={className} {...props}/>;
default:
return <span>{value}</span>;
}

View File

@ -823,13 +823,15 @@ FormInputColor.propTypes = {
testcid: PropTypes.string,
};
export function FormNote({text}) {
export function FormNote({text, className}) {
const classes = useStyles();
return (
<Box className={className}>
<Paper elevation={0} className={classes.noteRoot}>
<Box paddingRight="0.25rem"><DescriptionIcon fontSize="small" /></Box>
<Box>{HTMLReactParse(text)}</Box>
</Paper>
</Box>
);
}
FormNote.propTypes = {