Skip to content

Commit c821014

Browse files
author
Brendan Abbott
committed
No pointer when there's nothing to expand
1 parent 0ba6110 commit c821014

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

src/components/Response/Response.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export default class Response extends Component {
3535
<div className='response'>
3636
<div className={classNames('response-info', {
3737
success: successCode,
38-
error: !successCode
38+
error: !successCode,
39+
'is-clickable': hasDetails
3940
})} onClick={hasDetails ? this.onClick : undefined}>
4041
{hasDetails && <Indicator status={status} />}
4142
<span className='response-code'>{code}</span>

src/components/Response/Response.scss

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,20 @@ $red-dark: #e53935;
1414
}
1515

1616
.response-info {
17-
cursor: pointer;
1817
border: 1px solid $grey-dark;
1918
padding: 10px;
19+
2020
.indicator {
2121
margin-right: 10px;
2222
}
2323
}
2424

25-
.response-code {
26-
padding-right: 20px;
27-
}
28-
29-
.response-slide-toggle-appear,
30-
.response-slide-toggle-enter {
31-
max-height: 0;
25+
.is-clickable {
26+
cursor: pointer;
3227
}
3328

34-
.response-slide-toggle-appear.response-slide-toggle-appear-active,
35-
.response-slide-toggle-enter.response-slide-toggle-enter-active {
36-
max-height: 1500px;
37-
transition: max-height 500ms ease-in;
29+
.response-code {
30+
padding-right: 20px;
3831
}
3932

4033
.success {

0 commit comments

Comments
 (0)