From 63880baba974270077f705632ee365fb12cbb9e9 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Fri, 23 Aug 2019 16:08:56 +0200 Subject: [PATCH] Post-merge follow up on fixes suggested in #5319 --- web/src/nav/StatusMessagesNavItem.scss | 6 +++--- web/src/nav/StatusMessagesNavItem.tsx | 16 ++++++++-------- .../StatusMessagesNavItem.test.tsx.snap | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/web/src/nav/StatusMessagesNavItem.scss b/web/src/nav/StatusMessagesNavItem.scss index e41f359c3759..ef70e40ea9ee 100644 --- a/web/src/nav/StatusMessagesNavItem.scss +++ b/web/src/nav/StatusMessagesNavItem.scss @@ -21,15 +21,15 @@ &-link { margin-bottom: 0; } - &-border-success { + &--border-success { border-left: 6px solid $success; } - &-border-warning { + &--border-warning { border-left: 6px solid $warning; } - &-border-progress { + &--border-progress { border-left: 6px solid $info; } } diff --git a/web/src/nav/StatusMessagesNavItem.tsx b/web/src/nav/StatusMessagesNavItem.tsx index af47969a9d3d..1e495c5a2ece 100644 --- a/web/src/nav/StatusMessagesNavItem.tsx +++ b/web/src/nav/StatusMessagesNavItem.tsx @@ -48,12 +48,12 @@ interface StatusMessageEntryProps { showLink?: boolean linkTo: string linkText: string - style: EntryType + entryType: EntryType linkOnClick: (event: React.MouseEvent) => void } -function entryIcon(style: EntryType): JSX.Element { - switch (style) { +function entryIcon(entryType: EntryType): JSX.Element { + switch (entryType) { case 'warning': return case 'success': @@ -68,11 +68,11 @@ const StatusMessagesNavItemEntry: React.FunctionComponent

- {entryIcon(props.style)} + {entryIcon(props.entryType)} {props.title}

{props.text}

@@ -138,7 +138,7 @@ export class StatusMessagesNavItem extends React.PureComponent { linkTo="/site-admin/external-services" linkText="Configure external services" linkOnClick={this.toggleIsOpen} - style="progress" + entryType="progress" /> ) case 'SyncErrorStatusMessage': @@ -151,7 +151,7 @@ export class StatusMessagesNavItem extends React.PureComponent { linkTo={`/site-admin/external-services/${message.externalService.id}`} linkText={`Edit "${message.externalService.displayName}"`} linkOnClick={this.toggleIsOpen} - style="warning" + entryType="warning" /> ) } @@ -213,7 +213,7 @@ export class StatusMessagesNavItem extends React.PureComponent { linkTo="/site-admin/external-services" linkText="Configure external services" linkOnClick={this.toggleIsOpen} - style="success" + entryType="success" /> )} diff --git a/web/src/nav/__snapshots__/StatusMessagesNavItem.test.tsx.snap b/web/src/nav/__snapshots__/StatusMessagesNavItem.test.tsx.snap index 5f65fadef4d3..15a536b38c97 100644 --- a/web/src/nav/__snapshots__/StatusMessagesNavItem.test.tsx.snap +++ b/web/src/nav/__snapshots__/StatusMessagesNavItem.test.tsx.snap @@ -35,7 +35,7 @@ exports[`StatusMessagesNavItem no messages 1`] = ` External Service Status