@@ -7,6 +7,7 @@ import AddIcon from "@material-ui/icons/Add"
7
7
import RemoveIcon from "@material-ui/icons/Remove"
8
8
import ScheduleIcon from "@material-ui/icons/Schedule"
9
9
import { Maybe } from "components/Conditionals/Maybe"
10
+ import { Stack } from "components/Stack/Stack"
10
11
import dayjs from "dayjs"
11
12
import advancedFormat from "dayjs/plugin/advancedFormat"
12
13
import duration from "dayjs/plugin/duration"
@@ -76,19 +77,21 @@ export const WorkspaceScheduleButton: React.FC<
76
77
}
77
78
78
79
const handleSubmitHours = ( hours : number ) => {
79
- if ( editMode === "add" ) {
80
- onDeadlinePlus ( hours )
81
- }
82
- if ( editMode === "subtract" ) {
83
- onDeadlineMinus ( hours )
80
+ if ( hours !== 0 ) {
81
+ if ( editMode === "add" ) {
82
+ onDeadlinePlus ( hours )
83
+ }
84
+ if ( editMode === "subtract" ) {
85
+ onDeadlineMinus ( hours )
86
+ }
84
87
}
85
88
setEditMode ( "off" )
86
89
}
87
90
88
91
return (
89
92
< span className = { styles . wrapper } >
90
93
< Maybe condition = { shouldDisplayScheduleLabel ( workspace ) } >
91
- < span className = { styles . label } >
94
+ < Stack className = { styles . label } spacing = { 1 } direction = "row" alignItems = "center" >
92
95
< WorkspaceScheduleLabel workspace = { workspace } />
93
96
< Maybe condition = { canUpdateWorkspace && canEditDeadline ( workspace ) } >
94
97
< span className = { styles . actions } >
@@ -121,7 +124,7 @@ export const WorkspaceScheduleButton: React.FC<
121
124
< EditHours handleSubmit = { handleSubmitHours } />
122
125
</ Maybe >
123
126
</ Maybe >
124
- </ span >
127
+ </ Stack >
125
128
</ Maybe >
126
129
< >
127
130
< Button
@@ -218,13 +221,13 @@ const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
218
221
} ,
219
222
addButton : {
220
223
borderRadius : theme . shape . borderRadius ,
221
- backgroundColor : ( { editMode } ) =>
222
- editMode === "add" ? theme . palette . primary . main : "inherit " ,
224
+ border : ( { editMode } ) =>
225
+ editMode === "add" ? `2px solid ${ theme . palette . primary . main } ` : "2px solid transparent " ,
223
226
} ,
224
227
subtractButton : {
225
228
borderRadius : theme . shape . borderRadius ,
226
- backgroundColor : ( { editMode } ) =>
227
- editMode === "subtract" ? theme . palette . primary . main : "inherit" ,
229
+ border : ( { editMode } ) =>
230
+ editMode === "subtract" ? `2px solid ${ theme . palette . primary . main } ` : "2px solid transparent"
228
231
} ,
229
232
popoverPaper : {
230
233
padding : `${ theme . spacing ( 2 ) } px ${ theme . spacing ( 3 ) } px ${ theme . spacing (
0 commit comments