Skip to content

Commit

Permalink
enhancement #351 - Remove motion.section in TabPane
Browse files Browse the repository at this point in the history
Closes #351
  • Loading branch information
nancy-dassana committed Jun 23, 2021
1 parent 8f54c07 commit b7e2fec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Tabs/TabPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const useStyles = createUseStyles({
tabPane: {
...font.body,
display: ({ isActive }) => (isActive ? 'block' : 'none'),
height: '100%',
padding: `${spacing.m}px ${spacing.l}px`
}
})
Expand All @@ -30,18 +31,17 @@ const TabPane: FC<TabPaneProps> = ({

return (
<LazyMotion features={domAnimation}>
<motion.section
<motion.div
animate={isActive ? ACTIVE : INACTIVE}
className={cn(compClasses.tabPane, classes)}
transition={{ duration: 0.5 }}
variants={{
[ACTIVE]: { opacity: 1 },
[INACTIVE]: { opacity: 0 }
}}
>
<div className={cn(compClasses.tabPane, classes)}>
{render()}
</div>
</motion.section>
{render()}
</motion.div>
</LazyMotion>
)
}
Expand Down

0 comments on commit b7e2fec

Please sign in to comment.