You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Header.styled.js 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. import { Box, Typography } from "@mui/material";
  2. import styled from "styled-components";
  3. import { PrimaryButton } from "../Buttons/PrimaryButton/PrimaryButton";
  4. import { TextField } from "../TextFields/TextField/TextField";
  5. import { ReactComponent as Search } from "../../assets/images/svg/magnifying-glass.svg";
  6. import { ReactComponent as Swaps } from "../../assets/images/svg/swaps.svg";
  7. import selectedTheme from "../../themes";
  8. import { Icon } from "../Icon/Icon";
  9. export const SearchInput = styled(TextField)`
  10. background-color: ${selectedTheme.primaryBackgroundColor};
  11. width: 45%;
  12. flex: 3;
  13. max-width: 520px;
  14. margin-right: 30px;
  15. font-family: "DM Sans";
  16. @media (max-width: 1700px) {
  17. margin-left: 15%;
  18. }
  19. @media (max-width: 1550px) {
  20. margin-left: 15%;
  21. }
  22. @media (max-width: 1320px) {
  23. margin-left: 7%;
  24. }
  25. @media (max-width: 1100px) {
  26. width: 36%;
  27. }
  28. @media (max-width: 1000px) {
  29. width: 36%;
  30. margin-left: 5%;
  31. margin-right: 10px;
  32. }
  33. @media (max-width: 550px) {
  34. display: none;
  35. width: 0;
  36. }
  37. `;
  38. export const DrawerContainer = styled(Box)`
  39. display: flex;
  40. flex-direction: column;
  41. justify-content: center;
  42. align-items: center;
  43. margin: 25px;
  44. & div {
  45. flex-direction: column;
  46. }
  47. `;
  48. export const LogoContainer = styled(Box)`
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. cursor: pointer;
  53. `;
  54. export const ToolsButtonsContainer = styled(Box)`
  55. display: flex;
  56. flex: ${props => props.shrink ? "none" : "4"};;
  57. justify-content: space-between;
  58. min-width: ${(props) => (props.mobile ? "40px" : props.shrink ? "0" : "600px")};
  59. max-width: 600px;
  60. align-items: center;
  61. flex-wrap: nowrap;
  62. @media (max-width: 1400px) {
  63. min-width: ${props => props.shrink ? "0" : "450px"};
  64. }
  65. @media (max-width: 1200px) {
  66. min-width: ${props => props.shrink ? "0" : "400px"};
  67. }
  68. @media (max-width: 900px) {
  69. flex: 0.35;
  70. min-width: 0px;
  71. width: 60px;
  72. justify-content: right;
  73. }
  74. `;
  75. export const ToggleDrawerButton = styled(Box)`
  76. max-width: 40px;
  77. `;
  78. export const AddOfferButton = styled(PrimaryButton)`
  79. height: 49px;
  80. width: 180px;
  81. font-weight: 600;
  82. `;
  83. export const EndIcon = styled(Icon)``;
  84. export const SearchIcon = styled(Search)`
  85. position: relative;
  86. top: 11px;
  87. left: 4px;
  88. cursor: pointer;
  89. color: ${selectedTheme.primaryPurple};
  90. & path {
  91. width: 18px;
  92. height: 18px;
  93. }
  94. @media (max-width: 600px) {
  95. height: 14px;
  96. width: 14px;
  97. left: 11px;
  98. }
  99. `;
  100. export const UserButton = styled(Box)`
  101. display: flex;
  102. flex-direction: row;
  103. cursor: pointer;
  104. `;
  105. export const UserName = styled(Typography)`
  106. color: ${selectedTheme.primaryPurple};
  107. padding-top: 5px;
  108. padding-right: 10px;
  109. font-family: "DM Sans";
  110. font-weight: 600;
  111. white-space: nowrap;
  112. `;
  113. export const ToolsContainer = styled(Box)`
  114. display: flex;
  115. flex-direction: row;
  116. justify-content: ${(props) => (props.mobile ? "center" : "space-between")};
  117. align-items: ${(props) => (props.mobile ? "start" : "center")};
  118. ${(props) => !props.mobile && `width: 100%;`}
  119. & div button {
  120. ${(props) => props.mobile && `width: auto;`}
  121. }
  122. `;
  123. export const RegisterButton = styled(PrimaryButton)`
  124. height: 49px;
  125. width: 180px;
  126. font-weight: 600;
  127. @media (max-width: 550px) {
  128. margin-bottom: 20px;
  129. }
  130. `;
  131. export const LoginButton = styled(PrimaryButton)`
  132. height: 49px;
  133. width: 180px;
  134. font-weight: 600;
  135. margin-right: 10px;
  136. `;
  137. export const AuthButtonsContainer = styled(Box)`
  138. display: flex;
  139. justify-content: flex-start;
  140. flex: 1;
  141. min-width: ${(props) => (props.mobile ? "40px" : "200px")};
  142. max-width: 600px;
  143. align-items: flex-start;
  144. flex-wrap: nowrap;
  145. margin-left: 40px;
  146. & div {
  147. margin-left: 20px;
  148. }
  149. @media (max-width: 1300px) {
  150. margin-left: 0;
  151. }
  152. @media (max-width: 1200px) {
  153. min-width: 400px;
  154. }
  155. @media (max-width: 900px) {
  156. min-width: 0px;
  157. width: 0px;
  158. justify-content: right;
  159. }
  160. `;
  161. export const AuthButtonsDrawerContainer = styled(Box)`
  162. position: relative;
  163. left: 10px;
  164. height: 200px;
  165. display: flex;
  166. flex-direction: column;
  167. flex: 1;
  168. justify-content: space-around;
  169. `;
  170. export const SearchInputMobile = styled(SearchInput)`
  171. @media (max-width: 550px) {
  172. display: block;
  173. position: relative;
  174. width: 80%;
  175. top: 70px;
  176. height: 46px;
  177. left: -5px;
  178. font-family: "DM Sans";
  179. ${props => !props.shouldShow && `display: none;`}
  180. & div {
  181. background-color: white;
  182. height: 40px;
  183. overflow: visible;
  184. & input {
  185. font-size: 14px !important;
  186. }
  187. }
  188. }
  189. @media (min-width: 551px) {
  190. display: none;
  191. width: 0;
  192. }
  193. `;
  194. export const HeaderContainer = styled(Box)``;
  195. export const SwapsIcon = styled(Swaps)`
  196. `