20e296b20e
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.
24 lines
693 B
JavaScript
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;
|