Skip to content

Commit

Permalink
(HDS-2243) fix wrong ErrorSummary icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mrTuomoK committed May 6, 2024
1 parent 8c4e94f commit 13d0b60
Show file tree
Hide file tree
Showing 24 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [Component] What bugs/typos are fixed?
- [Footer] Fix Koros height issue (Calm type was of wrong height)
- [ErrorSummary] Change wrong error icon to correct one

### Core

Expand All @@ -40,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Changed

- [Component] What has been changed
- [ErrorSummary] Change wrong error icon to correct one

#### Fixed

Expand All @@ -62,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Fixed

- [Component] What bugs/typos are fixed?
- [ErrorSummary] Change wrong error icon to correct one

### Figma

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../notification/notification.css';
import './error-summary.css';
import '../../icons/icon.css';
import '../../icons/alert-circle.css';
import '../../icons/error-fill.css';

export default {
title: 'Components/Error summary',
Expand All @@ -12,7 +12,7 @@ export const Default = () => `
<section aria-label="Error summary" class="hds-notification hds-notification--error">
<div class="hds-notification__content">
<div class="hds-notification__label" role="heading" aria-level="2" tabindex="-1">
<span class="hds-icon hds-icon--alert-circle-fill" aria-hidden="true"></span>
<span class="hds-icon hds-icon--error-fill" aria-hidden="true"></span>
<span>Form contains following errors</span>
</div>
<div class="hds-notification__body hds-error-summary__body">
Expand All @@ -36,7 +36,7 @@ export const Large = () => `
<section aria-label="Error summary" class="hds-notification hds-notification--error hds-notification--large">
<div class="hds-notification__content">
<div class="hds-notification__label" role="heading" aria-level="2" tabindex="-1">
<span class="hds-icon hds-icon--alert-circle-fill" aria-hidden="true"></span>
<span class="hds-icon hds-icon--error-fill" aria-hidden="true"></span>
<span>Form contains following errors</span>
</div>
<div class="hds-notification__body hds-error-summary__body">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/react/src/components/errorSummary/ErrorSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useRef, useEffect } from 'react';
import '../../styles/base.module.css';
import errorSummaryStyles from './ErrorSummary.module.scss';
import notificationStyles from '../notification/Notification.module.css';
import { IconAlertCircleFill } from '../../icons';
import { IconErrorFill } from '../../icons';
import classNames from '../../utils/classNames';

export type ErrorSummarySize = 'default' | 'large';
Expand Down Expand Up @@ -62,7 +62,7 @@ export const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(
tabIndex={-1}
ref={labelRef}
>
<IconAlertCircleFill className={notificationStyles.icon} aria-hidden />
<IconErrorFill className={notificationStyles.icon} aria-hidden />
{label}
</div>
<div className={(notificationStyles.body, errorSummaryStyles.errorSummaryBody)}>{children}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ exports[`<ErrorSummary /> spec renders the component 1`] = `
>
<svg
aria-hidden="true"
aria-label="alert-circle-fill"
aria-label="error-fill"
class="icon s icon"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM13 16V18H11V16H13ZM13 6V14H11V6H13Z"
d="M11.175 3.45608C11.5239 2.86969 12.3977 2.84875 12.7842 3.39325L12.825 3.45608L21.8771 18.6666C22.2202 19.2432 21.8055 19.951 21.1235 19.9976L21.052 20H2.94799C2.24813 20 1.7987 19.3114 2.09013 18.7267L2.12295 18.6666L11.175 3.45608ZM13 16V18H11V16H13ZM13 8.5V14.5H11V8.5H13Z"
fill="currentColor"
fill-rule="evenodd"
/>
Expand Down
2 changes: 1 addition & 1 deletion site/src/docs/components/error-summary/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { ErrorSummary } from 'hds-react';
<section aria-label="Error summary" class="hds-notification hds-notification--error">
<div class="hds-notification__content">
<div class="hds-notification__label" role="heading" aria-level="2" tabindex="-1">
<span class="hds-icon hds-icon--alert-circle-fill" aria-hidden="true"></span>
<span class="hds-icon hds-icon--error-fill" aria-hidden="true"></span>
<span>Error summary</span>
</div>
<div class="hds-notification__body hds-error-summary__body">
Expand Down
2 changes: 1 addition & 1 deletion site/src/docs/components/error-summary/customisation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { ErrorSummary } from 'hds-react';
>
<div class="hds-notification__content">
<div class="hds-notification__label" role="heading" aria-level="2" tabindex="-1">
<span class="hds-icon hds-icon--alert-circle-fill" aria-hidden="true"></span>
<span class="hds-icon hds-icon--error-fill" aria-hidden="true"></span>
<span>Error summary</span>
</div>
<div class="hds-notification__body hds-error-summary__body">
Expand Down

0 comments on commit 13d0b60

Please sign in to comment.