mirror of
https://github.com/vercel/commerce.git
synced 2025-07-21 11:51:20 +00:00
✨ feat: Tab Common
This commit is contained in:
parent
7fcea39572
commit
e21fc5ee30
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user