styles.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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%" : "90%")};
  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 !important;
  38. margin: 0 !important;
  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. padding: 16px;
  48. overflow: hidden auto;
  49. max-height: 500px;
  50. `;
  51. export const ControlsWrapper = styled.div`
  52. display: flex;
  53. flex-direction: row-reverse;
  54. background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
  55. padding: 12px;
  56. border-radius: 0 0 5px 5px;
  57. gap: 10px;
  58. `;