Skip to content

Conversation

carmen-tang
Copy link
Contributor

No description provided.

HannaLetska
HannaLetska previously approved these changes Dec 18, 2019
Copy link
Contributor

@HannaLetska HannaLetska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

const transitionDuration = Math.max(this.accordionContent.current.clientHeight, 300) > 5000
? 5000
const transitionDuration = Math.max(this.accordionContent.current.clientHeight, 300) > 2000
? 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic makes no sense
if it's gonna take longer than 2 seconds, it'll make it 1 second. else everything else can go up to 2.
both numbers should be 2000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it if the client height is more than 2000, make it 1 second? Otherwise, make it whatever seconds the height it is? (height of container, 300px = 300ms)

this.accordionContent.current.parentNode.style.height = 0;

const closeTransitionDuration = Math.max(this.accordionContent.current.clientHeight, 300) > 2000
? 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic makes no sense
if it's gonna take longer than 2 seconds, it'll make it 1 second. else everything else can go up to 2.
both numbers should be 2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants