diff --git a/plugins/plugin-client-common/src/components/spi/Alert/impl/PatternFly.tsx b/plugins/plugin-client-common/src/components/spi/Alert/impl/PatternFly.tsx index e31bbd32d53..f75ff53f140 100644 --- a/plugins/plugin-client-common/src/components/spi/Alert/impl/PatternFly.tsx +++ b/plugins/plugin-client-common/src/components/spi/Alert/impl/PatternFly.tsx @@ -15,7 +15,12 @@ */ import React from 'react' -import { Alert, AlertActionCloseButton } from '@patternfly/react-core' + +// ugh, avoid backdrop.css parse errors in plugin prescan +const Alert = React.lazy(() => import('@patternfly/react-core').then(_ => ({ default: _.Alert }))) +const AlertActionCloseButton = React.lazy(() => + import('@patternfly/react-core').then(_ => ({ default: _.AlertActionCloseButton })) +) import { Props } from '..' import '../../../../../web/scss/components/Alert/PatternFly.scss' diff --git a/plugins/plugin-client-common/src/components/spi/Alert/index.tsx b/plugins/plugin-client-common/src/components/spi/Alert/index.tsx index 580a00f5a43..079678599dd 100644 --- a/plugins/plugin-client-common/src/components/spi/Alert/index.tsx +++ b/plugins/plugin-client-common/src/components/spi/Alert/index.tsx @@ -17,10 +17,14 @@ import React from 'react' import Props from './model' -const PatternFly = React.lazy(() => import('./impl/PatternFly')) +import PatternFly from './impl/PatternFly' export { Props } export default function AlertSpi(props: Props): React.ReactElement { - return + return ( + }> + + + ) }