Skip to content

Commit cd38e06

Browse files
author
Lucas Bento
committed
Fix UsefulContentSection not collapsing correctly
1 parent e2c536d commit cd38e06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/__tests__/components/common/__snapshots__/UsefulContentSection.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`renders without crashing 1`] = `
44
<div>
55
<div
6-
class="sc-AykKE dnSnnP"
6+
class="sc-AykKE lcDHUR"
77
>
88
<div
99
class="sc-AykKF dqdZRH"

src/components/common/UsefulContentSection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { Link } from './Markdown'
66

77
const Container = styled.div`
88
position: relative;
9-
margin-top: ${({ isVisible }) => (isVisible ? '16px' : 0)}
9+
${props => props.isVisible && 'margin-top: 16px;'}
1010
color: rgba(0, 0, 0, 0.65);
11-
max-height: ${({ isVisible }) => (isVisible ? '800px' : 0)}
11+
${props => (props.isVisible ? 'max-height: 800px;' : 'max-height: 0px;')}
1212
overflow: hidden;
1313
transition: max-height 0.4s ease-out, margin-top 0.4s ease-out 0.2s;
1414
`

0 commit comments

Comments
 (0)