From bdacc97454fb543cd621776125ecf6ea8c4283df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 23 Oct 2023 13:41:13 +0200 Subject: [PATCH] Using the lightbulb icon for linking to the documentation (#25013) * Using the lightbulb icon for linking to the documentation * Using the LightbulbOutlineIcon component * Generating the test snapshot --- .../user_settings_notifications.test.tsx.snap | 30 +++++++++++++++---- .../user_settings_notifications.scss | 11 +++++++ .../user_settings_notifications.tsx | 3 +- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/webapp/channels/src/components/user_settings/notifications/__snapshots__/user_settings_notifications.test.tsx.snap b/webapp/channels/src/components/user_settings/notifications/__snapshots__/user_settings_notifications.test.tsx.snap index 74ccbc1d59..0f31883aa8 100644 --- a/webapp/channels/src/components/user_settings/notifications/__snapshots__/user_settings_notifications.test.tsx.snap +++ b/webapp/channels/src/components/user_settings/notifications/__snapshots__/user_settings_notifications.test.tsx.snap @@ -54,9 +54,18 @@ Object { rel="noopener noreferrer" target="_blank" > - + + + Learn more about notifications @@ -278,9 +287,18 @@ Object { rel="noopener noreferrer" target="_blank" > - + + + Learn more about notifications diff --git a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.scss b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.scss index 4567e8f125..d15a7ed149 100644 --- a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.scss +++ b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.scss @@ -13,6 +13,7 @@ a { display: flex; + align-items: center; &:hover, &:active, @@ -34,6 +35,16 @@ text-decoration: underline; } } + + > svg { + width: 18px; + height: 18px; + padding: 2px; + margin-right: 4px; + background: rgba(var(--button-bg-rgb), 0.12); + border-radius: 50%; + text-align: center; + } } } } diff --git a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx index 634fca65fa..3c97a35769 100644 --- a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx +++ b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx @@ -10,6 +10,7 @@ import {FormattedMessage, injectIntl} from 'react-intl'; import type {Styles as ReactSelectStyles, ValueType} from 'react-select'; import CreatableReactSelect from 'react-select/creatable'; +import {LightbulbOutlineIcon} from '@mattermost/compass-icons/components'; import type {ServerError} from '@mattermost/types/errors'; import type {UserNotifyProps, UserProfile} from '@mattermost/types/users'; @@ -1102,7 +1103,7 @@ class NotificationsTab extends React.PureComponent { values={{ a: (chunks: string) => (( - + {chunks} )),