Skip to content

Commit

Permalink
fix active oncall highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
dctalbot authored and mastercactapus committed Dec 1, 2021
1 parent 93b908a commit c1b76ce
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions web/src/app/lists/FlatList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const useStyles = makeStyles({
},
background: { backgroundColor: 'white' },
highlightedItem: {
width: '100%',
borderLeft: '6px solid ' + lime,
background: lightLime,
},
Expand Down Expand Up @@ -235,13 +234,6 @@ export default function FlatList({
}

function renderItem(item: FlatListItem, idx: number): JSX.Element {
let itemClass = ''
if (!item.highlight) {
itemClass = classes.listItem
}
if (item.disabled) {
itemClass = classes.listItemDisabled
}
let itemProps = {}
if (item.url) {
itemProps = {
Expand All @@ -256,7 +248,11 @@ export default function FlatList({
scrollIntoView={item.scrollIntoView}
key={idx}
{...itemProps}
className={itemClass}
className={classnames({
[classes.listItem]: true,
[classes.highlightedItem]: item.highlight,
[classes.listItemDisabled]: item.disabled,
})}
>
{item.icon && <ListItemIcon>{item.icon}</ListItemIcon>}
<ListItemText
Expand Down

0 comments on commit c1b76ce

Please sign in to comment.