Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Optimized `ThemeProvider` to only output its custom properties in nested `ThemeProvider`s when they differ from the parent context ([#3550](https://github.com/Shopify/polaris-react/pull/3550))
- Generalized Tooltip's `content` prop's type to not only accept string, but any `React.Node`. ([#3559](https://github.com/Shopify/polaris-react/pull/3559))
- Updated `TopBar` to show the logo when there is no navigation or search fields ([#3523](https://github.com/Shopify/polaris-react/pull/3523))
- Updated critical `Banner` icon to be a diamond ([#3567](https://github.com/Shopify/polaris-react/pull/3567))

### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"postcolordocs": "yarn run format"
},
"dependencies": {
"@shopify/polaris-icons": "^4.0.0",
"@shopify/polaris-icons": "^4.1.0",
"@shopify/polaris-tokens": "^2.15.0",
"@types/react": "^16.9.12",
"@types/react-dom": "^16.9.4",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
CircleTickMajor,
CircleInformationMajor,
CircleAlertMajor,
CircleDisabledMajor,
DiamondAlertMajor,
} from '@shopify/polaris-icons';

import {classNames, variationName} from '../../utilities/css';
Expand Down Expand Up @@ -255,7 +255,7 @@ function useBannerAttributes(

case 'critical':
return {
defaultIcon: CircleDisabledMajor,
defaultIcon: DiamondAlertMajor,
iconColor: newDesignLanguage ? 'critical' : 'redDark',
ariaRoleType: 'alert',
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/Banner/tests/Banner.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
CircleTickMajor,
CircleInformationMajor,
CircleAlertMajor,
CircleDisabledMajor,
DiamondAlertMajor,
} from '@shopify/polaris-icons';
import {mountWithApp} from 'test-utilities/react-testing';
// eslint-disable-next-line no-restricted-imports
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('<Banner />', () => {

it('uses a redDark circleBarred if status is critical and sets an alert aria role', () => {
const banner = mountWithAppProvider(<Banner status="critical" />);
expect(banner.find(Icon).prop('source')).toBe(CircleDisabledMajor);
expect(banner.find(Icon).prop('source')).toBe(DiamondAlertMajor);
expect(banner.find(Icon).prop('color')).toBe('redDark');
expect(banner.find('div').first().prop('role')).toBe('alert');
});
Expand Down Expand Up @@ -228,7 +228,7 @@ describe('<Banner />', () => {
'Banner has a critical status',
'critical',
'critical',
CircleDisabledMajor,
DiamondAlertMajor,
],
])(
'Sets Icon props when: %s',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2018,10 +2018,10 @@
dependencies:
tslib "^1.9.3"

"@shopify/polaris-icons@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@shopify/polaris-icons/-/polaris-icons-4.0.0.tgz#a4fda8d009d94aff19b1c65e3e27f64f3f3977ad"
integrity sha512-g5VxZNmSOkbdCHeE7dI6yL2AuRD1AJ2dZfMkDJYL6u2eeedBAElcoTFWbF8/HJ5I/SKEWngt6rPUefAVsUxeKA==
"@shopify/polaris-icons@^4.1.0":
version "4.1.0"
resolved "https://registry.yarnpkg.com/@shopify/polaris-icons/-/polaris-icons-4.1.0.tgz#296ff47d22b52cb1592e2fa81a609f8f3c912eb0"
integrity sha512-U5ODhOJtfYHJskYUknceIjpF+EhHdMQJ54HSWsjuHAapCWbmA8ROVonAnDEM+cWeEVinpPZzQd2nE/DVJUmKkw==

"@shopify/polaris-tokens@^2.15.0":
version "2.15.0"
Expand Down