mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
- Refactor imports of PropTypes to use the prop-types package - Upgrade dependencies that were setting off deprecation warnings
26 lines
578 B
JavaScript
26 lines
578 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import classnames from 'classnames';
|
|
|
|
import Icon from 'components/icons/Icon';
|
|
|
|
const baseClass = 'persistent-flash';
|
|
|
|
const PersistentFlash = ({ message }) => {
|
|
const klass = classnames(baseClass, `${baseClass}--error`);
|
|
|
|
return (
|
|
<div className={klass}>
|
|
<div className={`${baseClass}__content`}>
|
|
<Icon name="warning-filled" /> <span>{message}</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
PersistentFlash.propTypes = {
|
|
message: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default PersistentFlash;
|
|
|