Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fold = async (content, direction = "normal") => {
- const scrollHeight = content.scrollHeight
- await animate({
- ...timing,
- direction,
- elements: content,
- opacity: [0, 1],
- maxHeight: ['0px', scrollHeight + 'px'],
- transform: ["scaleY(0)", 1],
- paddingTop: ['0em', '2em'], // add this
- paddingBottom: ['0em', '2em'] // add this
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement