Skip to content

Commit

Permalink
Fixes #38244 - replace toast notification with alert from pf5
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukshio committed Feb 26, 2025
1 parent 2d6d57f commit f275c28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 9 additions & 7 deletions webpack/assets/javascripts/react_app/components/Editor/Editor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { ToastNotification } from 'patternfly-react';
import { Alert, AlertActionCloseButton } from '@patternfly/react-core';

import { noop } from '../../common/helpers';
import DiffView from '../DiffView/DiffView';
Expand Down Expand Up @@ -119,14 +119,16 @@ class Editor extends React.Component {

return (
<div id="editor-container">
<ToastNotification
<Alert
id="preview_error_toast"
type="error"
ouiaId="preview_error_toast"
variant="danger"
className={showError ? '' : 'hidden'}
onDismiss={() => dismissErrorToast()}
>
{errorText}
</ToastNotification>
actionClose={
<AlertActionCloseButton onClose={() => dismissErrorToast()} />
}
title={errorText}
/>
<EditorNavbar
changeDiffViewType={changeDiffViewType}
changeTab={changeTab}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@
}

#preview_error_toast {
display: block;
margin-bottom: 0;
}

Expand Down

0 comments on commit f275c28

Please sign in to comment.