Skip to content

Commit 9712d86

Browse files
committed
Properly display selected action in UI
1 parent c587a84 commit 9712d86

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/components/RunActionItem.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
}
66

77
.run-action-item {
8-
width: 100%;
8+
display: block;
9+
910
&:hover {
1011
background-color: $secondary-color;
1112
}
13+
14+
&.selected {
15+
background-color: $secondary-color-dark;
16+
}
1217
}

src/components/RunActionItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,13 @@ export function RunActionItem(props: RunActionItemProps) {
9494
actions.select(action)
9595
}
9696

97+
const selected = state.selectedAction === action
98+
console.log(state.selectedAction, " ", action, selected)
99+
const className = "run-action-item" + (selected ? " selected" : "")
100+
97101
return (
98102
<li key={index}>
99-
<a href="" class="run-action-item" onclick={onclick}>
103+
<a href="" class={className} onclick={onclick}>
100104
{action.name}({getActionDataText(action)}){" "}
101105
{state.collapseRepeatingActions && (
102106
<span class="run-action-item-count">

src/components/RunsPane.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
flex: 0 0 40%;
33
border: 1px solid #666666;
44
margin: 0.1rem;
5+
align-items: stretch;
56

67
ul {
78
list-style-type: none;
89
margin: 0.3rem 0 0 0.3rem;
910

1011
li {
1112
margin: 0rem;
13+
width: 100%;
1214
}
1315
}
1416
}

0 commit comments

Comments
 (0)