Skip to content

Commit

Permalink
feat(notification): fixed ok icon
Browse files Browse the repository at this point in the history
* fix(*): fixed circle icon bug in notification

* fix(*): updated shapshots bacause of new icon lib version

* fix(*): fixed comments

* fix(gemini): updated screenshot for the new icon

Co-authored-by: Антон Степанок <[email protected]>
  • Loading branch information
2 people authored and Heymdall committed Jun 17, 2021
1 parent 8b826df commit 89e05b8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"license": "MPL-2.0",
"dependencies": {
"@alfalab/icons-classic": "^1.56.0",
"@alfalab/icons-glyph": "^1.95.0",
"@alfalab/icons-glyph": "^1.143.0",
"@babel/runtime-corejs2": "^7.7.6",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/lodash.sortedindexby": "^4.6.6",
Expand Down
2 changes: 2 additions & 0 deletions src/calendar/__snapshots__/calendar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ exports[`calendar should render without problems 1`] = `
fill="currentColor"
focusable="false"
height="24"
role="img"
viewBox="0 0 24 24"
width="24"
>
Expand All @@ -87,6 +88,7 @@ exports[`calendar should render without problems 1`] = `
fill="currentColor"
focusable="false"
height="24"
role="img"
viewBox="0 0 24 24"
width="24"
>
Expand Down
2 changes: 1 addition & 1 deletion src/notification/__snapshots__/notification.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`notification should render without problems 1`] = `
<div
className="notification__icon"
>
<r />
<l />
</div>
<div
className="notification__content"
Expand Down
2 changes: 1 addition & 1 deletion src/notification/notification.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
}

&__icon,
&_status_fail &__icon,
&__closer {
&_theme_alfa-on-white {
color: var(--color-white);
Expand Down
9 changes: 4 additions & 5 deletions src/notification/notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import React from 'react';
import { createCn } from 'bem-react-classname';
import {
CloseSIcon, ErrorMColorIcon, FailMIcon,
CloseSIcon, ErrorMColorIcon, FailMIcon, OkMColorIcon,
} from '@alfalab/icons-classic';
import { CheckmarkCircleMColorIcon } from '@alfalab/icons-glyph';
import { withTheme, Theme } from '../cn';

import IconButton from '../icon-button/icon-button';
Expand Down Expand Up @@ -175,8 +174,8 @@ export class Notification extends React.PureComponent<NotificationProps> {
switch (status) {
case 'error': ToggledIcon = ErrorMColorIcon; break;
case 'fail': ToggledIcon = FailMIcon; break;
case 'ok': ToggledIcon = CheckmarkCircleMColorIcon; break;
default: ToggledIcon = CheckmarkCircleMColorIcon; break;
case 'ok': ToggledIcon = OkMColorIcon; break;
default: ToggledIcon = OkMColorIcon; break;
}

return (
Expand All @@ -200,7 +199,7 @@ export class Notification extends React.PureComponent<NotificationProps> {
onKeyDown={ this.handleKeyDown }
data-test-id={ this.props['data-test-id'] }
>
<div className={ this.cn('icon', { theme: status === 'fail' && theme }) }>
<div className={ this.cn('icon', { theme }) }>
{
this.props.icon
|| (
Expand Down

0 comments on commit 89e05b8

Please sign in to comment.