From ee9a44e11b9f23c3fbbfe3e7bdd1d466f68b008f Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Tue, 3 Sep 2024 15:29:18 +0200 Subject: [PATCH] refactor: move error screen to component for easier reuse --- .../Visualization/PluginWarningMessage.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/components/Item/VisualizationItem/Visualization/PluginWarningMessage.js diff --git a/src/components/Item/VisualizationItem/Visualization/PluginWarningMessage.js b/src/components/Item/VisualizationItem/Visualization/PluginWarningMessage.js new file mode 100644 index 000000000..ca0c74e5a --- /dev/null +++ b/src/components/Item/VisualizationItem/Visualization/PluginWarningMessage.js @@ -0,0 +1,20 @@ +import { Cover, IconWarning24, colors } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React from 'react' +import classes from './styles/Visualization.module.css' + +export const PluginWarningMessage = ({ style, message }) => ( +
+ +
+ + {message} +
+
+
+) + +PluginWarningMessage.propTypes = { + message: PropTypes.string, + style: PropTypes.object, +}