styles.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import styled, { keyframes } from "styled-components";
  2. const appearAnimation = keyframes`
  3. from { transform: scale(0.6); opacity: 0; }
  4. to { transform: scale(1); opacity: 1; };
  5. `;
  6. export const ModalWrapper = styled.div`
  7. position: fixed;
  8. top: 0;
  9. left: 0;
  10. height: 100vh;
  11. width: 100%;
  12. display: flex;
  13. justify-content: center;
  14. align-items: center;
  15. background: rgba(0, 0, 0, 0.85);
  16. z-index: 36;
  17. * {
  18. box-sizing: border-box;
  19. }
  20. `;
  21. export const ModalInnerWrapper = styled.div<{ size: "sm" | "md" | "lg" }>`
  22. min-width: 440px;
  23. max-width: ${({ size }) => (size === "sm" ? "490px" : size === "md" ? "50%" : "80%")};
  24. width: fit-content;
  25. animation: ${appearAnimation} 220ms ease-in-out;
  26. line-height: 20px;
  27. @media only screen and (max-width: 768px) {
  28. min-width: 90%;
  29. max-width: 90%;
  30. }
  31. `;
  32. export const Title = styled.h2`
  33. display: flex;
  34. align-items: center;
  35. gap: 5px;
  36. color: ${({ theme }) => theme.INTERACTIVE_ACTIVE};
  37. font-size: 20px;
  38. margin: 0;
  39. `;
  40. export const HeaderWrapper = styled.div`
  41. background: ${({ theme }) => theme.MODAL_BACKGROUND};
  42. padding: 16px;
  43. border-radius: 5px 5px 0 0;
  44. `;
  45. export const ContentWrapper = styled.div`
  46. background: ${({ theme }) => theme.MODAL_BACKGROUND};
  47. color: ${({ theme }) => theme.TEXT_NORMAL};
  48. padding: 16px;
  49. overflow: hidden auto;
  50. height: fit-content;
  51. max-height: calc(100vh - 156px);
  52. `;
  53. export const ControlsWrapper = styled.div`
  54. display: flex;
  55. flex-direction: row-reverse;
  56. background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
  57. padding: 12px;
  58. border-radius: 0 0 5px 5px;
  59. gap: 10px;
  60. `;