Handle Cardigann "info" extra settings field

This commit is contained in:
Qstick
2020-12-31 02:48:38 -05:00
parent 6f113466bf
commit 76c271fab0
5 changed files with 54 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
class InfoInput extends Component {
//
// Render
render() {
const {
value
} = this.props;
console.log(this.props);
return (
<span dangerouslySetInnerHTML={{ __html: value }} />
);
}
}
InfoInput.propTypes = {
readOnly: PropTypes.bool,
autoFocus: PropTypes.bool,
placeholder: PropTypes.string,
name: PropTypes.string.isRequired,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]).isRequired,
hasError: PropTypes.bool,
hasWarning: PropTypes.bool,
hasButton: PropTypes.bool,
onChange: PropTypes.func.isRequired,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
onCopy: PropTypes.func,
onSelectionChange: PropTypes.func
};
InfoInput.defaultProps = {
value: ''
};
export default InfoInput;