Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Post-merge follow up on fixes suggested in #5319 (#5349)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnugget authored Aug 23, 2019
1 parent 70a5fe2 commit 0c66d8c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions web/src/nav/StatusMessagesNavItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
16 changes: 8 additions & 8 deletions web/src/nav/StatusMessagesNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ interface StatusMessageEntryProps {
showLink?: boolean
linkTo: string
linkText: string
style: EntryType
entryType: EntryType
linkOnClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void
}

function entryIcon(style: EntryType): JSX.Element {
switch (style) {
function entryIcon(entryType: EntryType): JSX.Element {
switch (entryType) {
case 'warning':
return <CloudAlertIcon className="icon-inline mr-1" />
case 'success':
Expand All @@ -68,11 +68,11 @@ const StatusMessagesNavItemEntry: React.FunctionComponent<StatusMessageEntryProp
key={props.text}
className={classNames(
'status-messages-nav-item__entry mb-3',
props.style && `status-messages-nav-item__entry-border-${props.style}`
props.entryType && `status-messages-nav-item__entry--border-${props.entryType}`
)}
>
<h4>
{entryIcon(props.style)}
{entryIcon(props.entryType)}
{props.title}
</h4>
<p>{props.text}</p>
Expand Down Expand Up @@ -138,7 +138,7 @@ export class StatusMessagesNavItem extends React.PureComponent<Props, State> {
linkTo="/site-admin/external-services"
linkText="Configure external services"
linkOnClick={this.toggleIsOpen}
style="progress"
entryType="progress"
/>
)
case 'SyncErrorStatusMessage':
Expand All @@ -151,7 +151,7 @@ export class StatusMessagesNavItem extends React.PureComponent<Props, State> {
linkTo={`/site-admin/external-services/${message.externalService.id}`}
linkText={`Edit "${message.externalService.displayName}"`}
linkOnClick={this.toggleIsOpen}
style="warning"
entryType="warning"
/>
)
}
Expand Down Expand Up @@ -213,7 +213,7 @@ export class StatusMessagesNavItem extends React.PureComponent<Props, State> {
linkTo="/site-admin/external-services"
linkText="Configure external services"
linkOnClick={this.toggleIsOpen}
style="success"
entryType="success"
/>
)}
</DropdownMenu>
Expand Down
10 changes: 5 additions & 5 deletions web/src/nav/__snapshots__/StatusMessagesNavItem.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`StatusMessagesNavItem no messages 1`] = `
External Service Status
</h3>
<div
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry-border-success"
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry--border-success"
>
<h4>
<svg
Expand Down Expand Up @@ -94,7 +94,7 @@ exports[`StatusMessagesNavItem one CLONING message as non-site admin 1`] = `
External Service Status
</h3>
<div
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry-border-progress"
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry--border-progress"
>
<h4>
<svg
Expand Down Expand Up @@ -153,7 +153,7 @@ exports[`StatusMessagesNavItem one CLONING message as site admin 1`] = `
External Service Status
</h3>
<div
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry-border-progress"
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry--border-progress"
>
<h4>
<svg
Expand Down Expand Up @@ -222,7 +222,7 @@ exports[`StatusMessagesNavItem one SYNCERROR message as non-site admin 1`] = `
External Service Status
</h3>
<div
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry-border-warning"
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry--border-warning"
>
<h4>
<svg
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`StatusMessagesNavItem one SYNCERROR message as site admin 1`] = `
External Service Status
</h3>
<div
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry-border-warning"
className="status-messages-nav-item__entry mb-3 status-messages-nav-item__entry--border-warning"
>
<h4>
<svg
Expand Down

0 comments on commit 0c66d8c

Please sign in to comment.