Skip to content

Commit

Permalink
refactor: move error screen to component for easier reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Sep 3, 2024
1 parent 82359d8 commit ee9a44e
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 }) => (
<div style={style}>
<Cover>
<div className={classes.messageContent}>
<IconWarning24 color={colors.grey500} />
{message}
</div>
</Cover>
</div>
)

PluginWarningMessage.propTypes = {
message: PropTypes.string,
style: PropTypes.object,
}

0 comments on commit ee9a44e

Please sign in to comment.