feat: Tab Common

This commit is contained in:
sonnguyenkieio 2021-09-08 09:59:40 +07:00
parent 7fcea39572
commit e21fc5ee30
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,23 @@
@import '../../../../../../styles/utilities';
.tabPane {
@apply hidden;
animation-duration: 0.6s;
animation-name: appear;
@keyframes appear {
from {
margin-left: 100%;
width: 200%;
}
to {
margin-left: 0%;
width: 100%;
}
}
&.active {
@apply block;
}
}

View File

@ -0,0 +1,20 @@
import classNames from "classnames"
import React from "react"
import s from './TabPane.module.scss'
interface TabPaneProps {
active: string;
children?: React.ReactNode;
}
const TabPane = ({ active="", children } : TabPaneProps) => {
return (
<section className={classNames(s.tabPane, {
[s[active]] : active
})}>
{children}
</section>
)
}
export default TabPane