diff --git a/package-lock.json b/package-lock.json index 51204a34..d9b23063 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@digitransit-component/digitransit-component-suggestion-item": "^3.0.3", "@habx/apollo-multi-endpoint-link": "^2.5.0", "@hsl-fi/design-tokens": "^1.24.0", + "@hsl-fi/icons": "^2.2.4", "@hsl-fi/layout-primitives": "^4.9.0", "@hsl-fi/modal": "^0.3.2", "@hsl-fi/site-footer": "^5.1.1", @@ -3647,19 +3648,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/form/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/form/node_modules/@hsl-fi/sass": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@hsl-fi/sass/-/sass-1.0.0.tgz", @@ -3688,9 +3676,17 @@ "integrity": "sha512-8pLP5a2LmC4T5n0W1Ry3KNsOeFbiLELEgSns6C5HOIKuppamhMrzPcpkZohOzA4YO8d2t2DfokUMhu2Kq9UaKg==" }, "node_modules/@hsl-fi/icons": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-1.0.8.tgz", - "integrity": "sha512-JtgZpksA7PeJhezbE2foQurbjhispotBeSxW3Pe6zMqmgBZSMBJx2UaZIG3ftyeWfErkf12qbLNyV661BnC2pQ==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", + "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", + "license": "MIT", + "dependencies": { + "classnames": "^2.5.1" + }, + "peerDependencies": { + "@hsl-fi/design-tokens": "^1.20.0", + "react": ">=16" + } }, "node_modules/@hsl-fi/layout-primitives": { "version": "4.9.0", @@ -3709,19 +3705,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/layout-primitives/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/loading-indicators": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@hsl-fi/loading-indicators/-/loading-indicators-2.0.0.tgz", @@ -3747,6 +3730,11 @@ "react-modal": "^3.11.2" } }, + "node_modules/@hsl-fi/modal/node_modules/@hsl-fi/icons": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-1.0.8.tgz", + "integrity": "sha512-JtgZpksA7PeJhezbE2foQurbjhispotBeSxW3Pe6zMqmgBZSMBJx2UaZIG3ftyeWfErkf12qbLNyV661BnC2pQ==" + }, "node_modules/@hsl-fi/navigation": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@hsl-fi/navigation/-/navigation-3.2.0.tgz", @@ -3766,19 +3754,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/navigation/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/notifications": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@hsl-fi/notifications/-/notifications-4.1.0.tgz", @@ -3799,19 +3774,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/notifications/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/overlays": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@hsl-fi/overlays/-/overlays-3.0.2.tgz", @@ -3856,19 +3818,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/site-footer/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/site-header": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@hsl-fi/site-header/-/site-header-6.5.0.tgz", @@ -3895,19 +3844,6 @@ "react": ">=16" } }, - "node_modules/@hsl-fi/site-header/node_modules/@hsl-fi/icons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-2.3.0.tgz", - "integrity": "sha512-XqItdXr3I844PPpNdvxp1Qvy9LvoW2viRkSIkrqozVPSowBd2wgDwVbeR5L5UgTFcsPlK/SEVYypuwfDpXKOzA==", - "license": "MIT", - "dependencies": { - "classnames": "^2.5.1" - }, - "peerDependencies": { - "@hsl-fi/design-tokens": "^1.20.0", - "react": ">=16" - } - }, "node_modules/@hsl-fi/utilities": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@hsl-fi/utilities/-/utilities-0.4.0.tgz", @@ -3918,6 +3854,11 @@ "@hsl-fi/icons": "^1.0.6" } }, + "node_modules/@hsl-fi/utilities/node_modules/@hsl-fi/icons": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@hsl-fi/icons/-/icons-1.0.8.tgz", + "integrity": "sha512-JtgZpksA7PeJhezbE2foQurbjhispotBeSxW3Pe6zMqmgBZSMBJx2UaZIG3ftyeWfErkf12qbLNyV661BnC2pQ==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", diff --git a/package.json b/package.json index 634bf915..f290be7e 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@digitransit-component/digitransit-component-suggestion-item": "^3.0.3", "@habx/apollo-multi-endpoint-link": "^2.5.0", "@hsl-fi/design-tokens": "^1.24.0", + "@hsl-fi/icons": "^2.2.4", "@hsl-fi/layout-primitives": "^4.9.0", "@hsl-fi/modal": "^0.3.2", "@hsl-fi/site-footer": "^5.1.1", diff --git a/src/test/BannerHSL.test.tsx b/src/test/BannerHSL.test.tsx index 379da49f..5ec8b5ff 100644 --- a/src/test/BannerHSL.test.tsx +++ b/src/test/BannerHSL.test.tsx @@ -5,7 +5,7 @@ jest.mock('@hsl-fi/site-header', () => ({ })); jest.mock('@hsl-fi/icons', () => ({ - Alert: () => , + AlertTriangleFilled: () => , })); jest.mock('../util/logoutUtil', () => ({ logout: jest.fn() })); diff --git a/src/ui/Banner.scss b/src/ui/Banner.scss index 4c603cde..9d4797e6 100644 --- a/src/ui/Banner.scss +++ b/src/ui/Banner.scss @@ -53,9 +53,10 @@ } &__icon { - margin-top: 3px; margin-right: 10px; flex-shrink: 0; + position: relative; + top: 2px; svg { width: 19px; diff --git a/src/ui/BannerHSL.tsx b/src/ui/BannerHSL.tsx index b49ec844..47cdb9fc 100644 --- a/src/ui/BannerHSL.tsx +++ b/src/ui/BannerHSL.tsx @@ -1,7 +1,7 @@ import React, { useState, useContext, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { SiteHeader, UserMenu, QuickSearch } from '@hsl-fi/site-header'; -import { Alert } from '@hsl-fi/icons'; +import { AlertTriangleFilled } from '@hsl-fi/icons'; import { UserContext, ConfigContext } from '../contexts'; import { logout } from '../util/logoutUtil'; @@ -262,8 +262,12 @@ const BannerHSL = () => { > {banner.priority === 'Primary' && (
- {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */} - +
)}