element-web/src/components/views/elements/AppWarning.js
J. Ryan Stinnett 20e296b20e Convert image URLs in React to require calls
This allows Webpack to insert the proper image URL after builds steps like
adding a hash and so on. The path you supply to `require` is relative to the JS
source file, just like any other would be.
2019-01-17 22:06:49 -06:00

24 lines
693 B
JavaScript

import React from 'react'; // eslint-disable-line no-unused-vars
import PropTypes from 'prop-types';
const AppWarning = (props) => {
return (
<div className='mx_AppPermissionWarning'>
<div className='mx_AppPermissionWarningImage'>
<img src={require("../../../../res/img/warning.svg")} alt='' />
</div>
<div className='mx_AppPermissionWarningText'>
<span className='mx_AppPermissionWarningTextLabel'>{ props.errorMsg }</span>
</div>
</div>
);
};
AppWarning.propTypes = {
errorMsg: PropTypes.string,
};
AppWarning.defaultProps = {
errorMsg: 'Error',
};
export default AppWarning;