Skip to content

Commit

Permalink
Merge pull request #3480 from dlabrecq/4383-delete
Browse files Browse the repository at this point in the history
Fix cost modal delete dialog
  • Loading branch information
dlabrecq authored Nov 2, 2023
2 parents cb690cb + 27cb4c9 commit af0e9b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@

exports[`dialog title renders correctly with icon and title text 1`] = `
<span
class="pf-v5-c-icon__content pf-m-warning"
class="pf-v5-c-modal-box__title-text"
>
<svg
aria-hidden="true"
class="pf-v5-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 576 512"
width="1em"
>
<path
d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
/>
</svg>
Test dialog
</span>
`;
12 changes: 3 additions & 9 deletions src/routes/settings/costModels/costModel/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Alert, Button, Icon, Modal, Title, TitleSizes } from '@patternfly/react-core';
import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import { Alert, Button, Modal } from '@patternfly/react-core';
import { intl as defaultIntl } from 'components/i18n';
import messages from 'locales/messages';
import React from 'react';
Expand Down Expand Up @@ -49,16 +48,11 @@ const DialogBase: React.FC<Props> = ({
return (
<Modal
aria-label={title}
header={
<Title headingLevel="h1" size={TitleSizes['2xl']}>
<Icon status="warning">
<ExclamationTriangleIcon /> {title}
</Icon>
</Title>
}
isOpen={isOpen}
onClose={onClose}
actions={actions}
title={title}
titleIconVariant="warning"
variant={isSmall ? 'small' : 'default'}
>
{error && <Alert variant="danger" title={`${error}`} />}
Expand Down

0 comments on commit af0e9b3

Please sign in to comment.