Advertisement
Guest User

Untitled

a guest
Nov 25th, 2023
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. return (
  2. <>
  3. <div
  4. className={`absolute overflow-hidden -translate-x-1/2 transition-all ${
  5. !onFlip ? 'visible' : 'hidden'
  6. }`}
  7. style={{
  8. zIndex: 1000,
  9. height: height,
  10. width: width,
  11. opacity: onFlip ? '0' : '1',
  12. }}>
  13. <img
  14. className="absolute h-full w-full object-fill pointer-events-none z-1000"
  15. src={`${topLayout}`}
  16. alt="top-front"
  17. style={{ height: height / 2, zIndex: 1000 }}
  18. />
  19.  
  20. <img
  21. className="absolute bottom-0 left-0 w-full object-fill pointer-events-none z-1000"
  22. src={bottomLayout}
  23. alt="bottom"
  24. style={{ height: height / 2, zIndex: 1000 }}
  25. />
  26. <div className="rounded-b-[12%] rounded-t-[12%] overflow-hidden h-full w-full">
  27. {children}
  28. </div>
  29. </div>
  30.  
  31. {onFlip && (
  32. <>
  33. <TopFrontLayout
  34. height={height}
  35. width={width}
  36. flipped={flipped}
  37. removeAnimation={removeAnimation}
  38. hide={hideTopLayout}>
  39. {children}
  40. </TopFrontLayout>
  41.  
  42. <BottomFrontLayout
  43. height={height}
  44. width={width}
  45. hide={hideBottomLayout}>
  46. <div style={{ transform: `translateY(-${height / 2}px)` }}>
  47. {children}
  48. </div>
  49. </BottomFrontLayout>
  50. </>
  51. )}
  52. </>
  53. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement