import PropTypes from 'prop-types';
import React from 'react';
class EditorAccessibility extends React.Component {
componentDidMount() {
}
render() {
const messages = [];
if (this.props.lintMessages.length > 0) {
this.props.lintMessages.forEach((lintMessage, i) => {
messages.push((
{lintMessage.severity} in line
{lintMessage.line} :
{lintMessage.message}
));
});
} else {
messages.push( There are no lint messages );
}
return (
);
}
}
EditorAccessibility.propTypes = {
lintMessages: PropTypes.arrayOf(PropTypes.shape({
severity: PropTypes.string.isRequired,
line: PropTypes.number.isRequired,
message: PropTypes.string.isRequired,
id: PropTypes.number.isRequired
})).isRequired,
};
export default EditorAccessibility;