2021-10-26 11:58:49 -07:00
|
|
|
export const FlipCard = ({ children, ...props }) => {
|
|
|
|
return (
|
|
|
|
<div {...props} className="flipcard">
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2021-09-24 05:24:17 -07:00
|
|
|
|
2021-10-26 11:58:49 -07:00
|
|
|
export const FlipCardInner = (props) => {
|
|
|
|
return (
|
|
|
|
<div
|
2022-03-09 12:53:11 -08:00
|
|
|
className="relative h-full w-full text-center"
|
2021-10-26 11:58:49 -07:00
|
|
|
style={{
|
|
|
|
transition: 'transform 0.8s ease-out',
|
|
|
|
transformStyle: 'preserve-3d',
|
|
|
|
transform: `${props.flip ? 'rotateY(0deg)' : 'rotateY(180deg)'}`,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{props.children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2021-09-24 05:24:17 -07:00
|
|
|
|
2021-10-26 11:58:49 -07:00
|
|
|
export const FlipCardFront = (props) => {
|
2022-03-09 12:53:11 -08:00
|
|
|
return <div className="flipcard-front h-full w-full">{props.children}</div>
|
2021-10-26 11:58:49 -07:00
|
|
|
}
|
2021-09-24 05:24:17 -07:00
|
|
|
|
2021-10-26 11:58:49 -07:00
|
|
|
export const FlipCardBack = ({ children }) => {
|
|
|
|
return (
|
|
|
|
<div
|
2022-03-09 12:53:11 -08:00
|
|
|
className="absolute h-full w-full"
|
2021-10-26 11:58:49 -07:00
|
|
|
style={{ transform: 'rotateY(180deg)' }}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|