Skip to content

Commit

Permalink
refactor(createCredentialDialog): discovery-148 pf4 alert(#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 authored and cdcabrera committed Sep 20, 2022
1 parent b843c7e commit 1aa7482
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/createCredentialDialog/createCredentialDialog.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button, ButtonVariant, Title } from '@patternfly/react-core';
import { Alert, Form, Grid } from 'patternfly-react';
import { Alert, Button, ButtonVariant, Title } from '@patternfly/react-core';
import { Form, Grid } from 'patternfly-react';
import { Modal } from '../modal/modal';
import { connect, reduxActions, reduxTypes, store } from '../../redux';
import { helpers } from '../../common/helpers';
Expand Down Expand Up @@ -77,7 +77,8 @@ class CreateCredentialDialog extends React.Component {

state = { ...this.initialState };

UNSAFE_componentWillReceiveProps(nextProps) { //eslint-disable-line
// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
const { edit, fulfilled, getCredentials, show, viewOptions } = this.props;

if (!show && nextProps.show) {
Expand Down Expand Up @@ -389,8 +390,8 @@ class CreateCredentialDialog extends React.Component {

if (error) {
return (
<Alert type="error" onDismiss={this.onErrorDismissed}>
<strong>Error</strong> {errorMessage}
<Alert isInline variant="danger" title="Error">
{errorMessage}
</Alert>
);
}
Expand Down

0 comments on commit 1aa7482

Please sign in to comment.