aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-07-11 15:15:35 +0200
committerSonarTech <sonartech@sonarsource.com>2019-07-11 20:21:09 +0200
commit60226e8e297485bcbe384dc766930da0a5a1c079 (patch)
tree84140c9f6d8d0828dbe4db676f8a06a5d6b4b077 /server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
parent7ae6f6f0968febebf763cf073b09cb6dd2b218d7 (diff)
downloadsonarqube-60226e8e297485bcbe384dc766930da0a5a1c079.tar.gz
sonarqube-60226e8e297485bcbe384dc766930da0a5a1c079.zip
SC-704 Extract components into sonar-ui-common (#1714)
* SC-704 Extract icons components to sonar-ui-common * Better typings for theme * Use sonar-ui-common in extensions * Extract some helpers * Extract l10n helper to sonar-ui-common * Extract requests helper to sonar-ui-common * Extract part of urls helper * Move buttons, Tooltips and ScreenPositionFixers * Move modal related components * Move IdentityProviderLink * Move GenericAvatar * Move SizeRating * Move charts and move deps to peerDeps * Move nav * Move formatMeasure * Move Rating * Move PageActions * Move the rest of ui components * Move more controls components * Include theme inside extension build * Add missing theme context provider in extensions * Update react to same version everywhere * Update sonar-ui-common * Update eslint configuration
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx')
-rw-r--r--server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
index 7463fae9b79..93418181434 100644
--- a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
+++ b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
@@ -19,13 +19,13 @@
*/
import * as React from 'react';
import * as classNames from 'classnames';
+import * as differenceInSeconds from 'date-fns/difference_in_seconds';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import { ClearButton } from 'sonar-ui-common/components/controls/buttons';
+import Modal from 'sonar-ui-common/components/controls/Modal';
+import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import DateFormatter from '../../../components/intl/DateFormatter';
-import DeferredSpinner from '../../../components/common/DeferredSpinner';
-import Modal from '../../../components/controls/Modal';
-import { ClearButton } from '../../../components/ui/buttons';
import { PrismicFeatureNews } from '../../../api/news';
-import { differenceInSeconds } from '../../../helpers/dates';
-import { translate } from '../../../helpers/l10n';
export interface Props {
fetchMoreFeatureNews: () => void;
@@ -39,11 +39,12 @@ export interface Props {
export default function NotificationsSidebar(props: Props) {
const { loading, loadingMore, news, notificationsLastReadDate, paging } = props;
+ const header = translate('embed_docs.whats_new');
return (
- <Modal onRequestClose={props.onClose}>
+ <Modal contentLabel={header} onRequestClose={props.onClose}>
<div className="notifications-sidebar">
<div className="notifications-sidebar-top">
- <h3>{translate('embed_docs.whats_new')}</h3>
+ <h3>{header}</h3>
<ClearButton
className="button-tiny"
iconProps={{ size: 12, thin: true }}