diff --git a/services/web/frontend/js/shared/components/notification.tsx b/services/web/frontend/js/shared/components/notification.tsx index 30a35c812c..c8f15be406 100644 --- a/services/web/frontend/js/shared/components/notification.tsx +++ b/services/web/frontend/js/shared/components/notification.tsx @@ -3,7 +3,12 @@ import React, { ReactElement, useState } from 'react' import { useTranslation } from 'react-i18next' import MaterialIcon from './material-icon' -export type NotificationType = 'info' | 'success' | 'warning' | 'error' +export type NotificationType = + | 'info' + | 'success' + | 'warning' + | 'error' + | 'offer' type NotificationProps = { action?: React.ReactElement @@ -35,8 +40,9 @@ function NotificationIcon({ icon = } else if (notificationType === 'error') { icon = + } else if (notificationType === 'offer') { + icon = } - return
{icon}
} diff --git a/services/web/frontend/stories/style-guide.stories.jsx b/services/web/frontend/stories/style-guide.stories.jsx index 5276164176..842263ef92 100644 --- a/services/web/frontend/stories/style-guide.stories.jsx +++ b/services/web/frontend/stories/style-guide.stories.jsx @@ -210,6 +210,12 @@ const ButtonsTemplate = (args, { globals: { theme } }) => { + +

Sizes

@@ -287,6 +293,18 @@ export const Alerts = () => { } /> + + + + .notitifcation .notification-type-offer + + + } + /> + Note: these styles below will be deprecated since there are new alert styles rolling out as part of the new design system diff --git a/services/web/frontend/stylesheets/components/buttons.less b/services/web/frontend/stylesheets/components/buttons.less index b8e837ca58..9ea5be08b5 100755 --- a/services/web/frontend/stylesheets/components/buttons.less +++ b/services/web/frontend/stylesheets/components/buttons.less @@ -103,6 +103,10 @@ .btn-info-ghost { .btn-borderless(@blue-50, @btn-info-ghost-bg, @blue-10); } +// Background Ghost appear as neutral-90 (matching our text colour) with no border +.btn-bg-ghost { + .btn-borderless(@neutral-90, @btn-info-ghost-bg, @neutral-10); +} // Inline button to fit text, without link styling. // TODO: generic class for other styles .btn-info-ghost-inline { diff --git a/services/web/frontend/stylesheets/components/notifications.less b/services/web/frontend/stylesheets/components/notifications.less index 1f189c9a2b..dd86eb061c 100644 --- a/services/web/frontend/stylesheets/components/notifications.less +++ b/services/web/frontend/stylesheets/components/notifications.less @@ -151,6 +151,13 @@ color: @red-50; } } + &.notification-type-offer { + background-color: @white; + border: 1px solid @neutral-20; + .notification-icon { + color: @neutral-50; + } + } @media (min-width: @screen-sm-min) { &:not(.notification-cta-below-content) {