Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ChatCard.styled.js 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. import { Box, Container, Typography } from "@mui/material";
  2. import styled from "styled-components";
  3. import selectedTheme from "../../../themes";
  4. import { IconButton } from "../../Buttons/IconButton/IconButton";
  5. import { PrimaryButton } from "../../Buttons/PrimaryButton/PrimaryButton";
  6. import { Icon } from "../../Icon/Icon";
  7. import { ReactComponent as Eye } from "../../../assets/images/svg/eye-striked.svg";
  8. export const ChatCardContainer = styled(Container)`
  9. display: flex;
  10. flex-direction: row;
  11. height: 180px;
  12. width: ${(props) => (!props.halfwidth ? "100%" : "49%")};
  13. box-sizing: border-box;
  14. margin: 10px 0;
  15. background-color: ${(props) =>
  16. props.sponsored === "true"
  17. ? selectedTheme.backgroundSponsoredColor
  18. : "white"};
  19. border-radius: 4px;
  20. ${(props) =>
  21. props.sponsored === "true" &&
  22. `border: 1px solid ${selectedTheme.borderSponsoredColor};`}
  23. padding: 16px;
  24. max-width: 2000px;
  25. height: 180px;
  26. position: relative;
  27. justify-content: space-between;
  28. @media (max-width: 550px) {
  29. height: auto;
  30. ${(props) =>
  31. props.vertical &&
  32. `
  33. height: 330px;
  34. width: 180px;
  35. margin: 0 18px;
  36. `}
  37. }
  38. `;
  39. export const UserImage = styled.img`
  40. border-radius: 50%;
  41. width: 144px;
  42. height: 144px;
  43. @media (max-width: 600px) {
  44. width: 90px;
  45. height: 90px;
  46. }
  47. `;
  48. export const UserImgWrapper = styled(Box)`
  49. overflow: hidden;
  50. border-radius: 50%;
  51. width: 144px;
  52. height: 144px;
  53. @media (max-width: 600px) {
  54. width: 90px;
  55. height: 90px;
  56. }
  57. `;
  58. export const OfferImgWrapper = styled(Box)`
  59. overflow: hidden;
  60. border-radius: 4px;
  61. width: 72px;
  62. height: 72px;
  63. `;
  64. export const OfferFlexContainer = styled(Container)`
  65. display: flex;
  66. flex-direction: row;
  67. margin: 0;
  68. padding: 0;
  69. max-height: 184px;
  70. @media (max-width: 600px) {
  71. ${(props) =>
  72. props.vertical &&
  73. `
  74. flex-direction: column;
  75. `}
  76. }
  77. `;
  78. export const OfferCardContainer = styled(Container)`
  79. display: flex;
  80. flex-direction: column;
  81. box-sizing: border-box;
  82. padding: 16px;
  83. max-width: 2000px;
  84. position: relative;
  85. @media (max-width: 550px) {
  86. }
  87. `;
  88. export const OfferCardContainerMobile = styled(Box)`
  89. display: none;
  90. @media (max-width: 550px) {
  91. position: relative;
  92. display: flex;
  93. flex-direction: column;
  94. box-sizing: border-box;
  95. }
  96. `;
  97. export const OfferInfo = styled(Box)`
  98. display: flex;
  99. flex: 2;
  100. flex-direction: column;
  101. justify-content: space-between;
  102. margin-left: 18px;
  103. ${(props) =>
  104. props.vertical &&
  105. `
  106. margin-left: 0;
  107. margin-top: 5px;
  108. `}
  109. `;
  110. export const OfferTitle = styled(Typography)`
  111. font-family: "Open Sans";
  112. flex: 1;
  113. color: ${selectedTheme.primaryPurple};
  114. font-weight: 700;
  115. font-size: 18px;
  116. cursor: pointer;
  117. @media (max-width: 550px) {
  118. font-size: 14px;
  119. display: none;
  120. ${(props) =>
  121. props.vertical &&
  122. `
  123. display: flex;
  124. flex: none;
  125. position: relative;
  126. line-height: 22px;
  127. margin-top: 5px;
  128. font-size: 18px;
  129. `}
  130. }
  131. `;
  132. export const OfferTitleMobile = styled(Typography)`
  133. font-family: "Open Sans";
  134. display: none;
  135. flex: 1;
  136. color: ${selectedTheme.primaryPurple};
  137. font-weight: 700;
  138. font-size: 18px;
  139. cursor: pointer;
  140. @media (max-width: 550px) {
  141. display: block;
  142. ${(props) =>
  143. props.vertical &&
  144. `
  145. display: flex;
  146. flex: none;
  147. position: relative;
  148. line-height: 22px;
  149. margin-top: 5px;
  150. font-size: 18px;
  151. `}
  152. }
  153. `;
  154. export const OfferAuthor = styled(Box)`
  155. display: flex;
  156. flex: 1;
  157. flex-direction: column;
  158. `;
  159. export const OfferAuthorName = styled(Typography)`
  160. font-family: "Open Sans";
  161. line-height: 22px;
  162. font-size: 16px;
  163. color: ${selectedTheme.primaryText};
  164. @media (max-width: 600px) {
  165. font-size: 14px;
  166. ${(props) =>
  167. props.vertical &&
  168. `
  169. line-height: 19px;
  170. font-size: 14px;
  171. position: absolute;
  172. bottom: 80px;
  173. `}
  174. }
  175. `;
  176. export const OfferLocation = styled(Typography)`
  177. font-family: "Open Sans";
  178. color: ${selectedTheme.primaryDarkText};
  179. line-height: 16px;
  180. font-size: 12px;
  181. ${(props) =>
  182. props.vertical &&
  183. `
  184. font-size: 12px;
  185. margin-top: 5px;
  186. position: absolute;
  187. bottom: 61px;
  188. `}
  189. `;
  190. export const OfferDetails = styled(Box)`
  191. display: flex;
  192. flex-direction: row;
  193. flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
  194. justify-content: start;
  195. gap: 1rem;
  196. @media (max-width: 650px) {
  197. flex-direction: column;
  198. justify-content: center;
  199. gap: 0;
  200. }
  201. `;
  202. export const OfferCategory = styled(Box)`
  203. font-family: "Open Sans";
  204. color: ${selectedTheme.primaryText};
  205. line-height: 16px;
  206. font-size: 12px;
  207. ${(props) =>
  208. props.vertical &&
  209. `
  210. position: absolute;
  211. bottom: 15px;
  212. `}
  213. `;
  214. export const OfferPackage = styled(Box)`
  215. font-family: "Open Sans";
  216. color: ${selectedTheme.primaryText};
  217. line-height: 16px;
  218. font-size: 12px;
  219. `;
  220. export const OfferViews = styled(Box)`
  221. font-family: "Open Sans";
  222. color: ${selectedTheme.primaryText};
  223. line-height: 16px;
  224. font-size: 12px;
  225. ${(props) =>
  226. props.vertical &&
  227. `
  228. display: none;
  229. `}
  230. `;
  231. export const OfferDescriptionTitle = styled(Box)`
  232. font-family: "Open Sans";
  233. font-size: 12px;
  234. color: ${selectedTheme.primaryDarkText};
  235. line-height: 16px;
  236. `;
  237. export const OfferDescriptionText = styled(Box)`
  238. font-family: "Open Sans";
  239. font-size: 16px;
  240. color: ${selectedTheme.primaryDarkText};
  241. line-height: 22px;
  242. max-width: calc(100% - 230px);
  243. max-height: 120px;
  244. overflow: hidden;
  245. display: -webkit-box;
  246. -webkit-line-clamp: 5;
  247. -webkit-box-orient: vertical;
  248. @media (max-width: 1500px) {
  249. display: none;
  250. }
  251. `;
  252. export const OfferDescription = styled(Box)`
  253. flex: 3;
  254. margin: auto 0;
  255. padding-left: 35px;
  256. @media (max-width: 1500px) {
  257. display: none;
  258. }
  259. `;
  260. export const DetailIcon = styled(Icon)`
  261. & svg {
  262. width: 14px;
  263. position: relative;
  264. top: -1px;
  265. }
  266. `;
  267. export const DetailText = styled(Typography)`
  268. font-family: "Open Sans";
  269. color: ${selectedTheme.primaryText};
  270. line-height: 16px;
  271. font-size: 12px;
  272. position: relative;
  273. top: -2px;
  274. left: 3px;
  275. `;
  276. export const CheckButton = styled(PrimaryButton)`
  277. width: 180px;
  278. height: 48px;
  279. background-color: ${selectedTheme.primaryPurple};
  280. &:hover button {
  281. background-color: ${selectedTheme.primaryPurple} !important;
  282. color: white !important;
  283. }
  284. @media (max-width: 600px) {
  285. display: none;
  286. }
  287. `;
  288. export const MessageIcon = styled(IconButton)`
  289. width: 40px;
  290. height: 40px;
  291. background-color: ${selectedTheme.primaryIconBackgroundColor};
  292. border-radius: 100%;
  293. padding-top: 2px;
  294. text-align: center;
  295. @media (max-width: 600px) {
  296. width: 30px;
  297. height: 30px;
  298. top: 16px;
  299. right: 16px;
  300. padding: 0;
  301. ${(props) =>
  302. props.vertical &&
  303. `
  304. display: none;
  305. `}
  306. & button svg {
  307. width: 16px;
  308. height: 16px;
  309. position: relative;
  310. top: -3px;
  311. left: -2.4px;
  312. }
  313. }
  314. `;
  315. export const OfferImageContainer = styled(Box)`
  316. min-width: 144px;
  317. min-height: 144px;
  318. width: 144px;
  319. height: 144px;
  320. @media (max-width: 600px) {
  321. ${(props) =>
  322. !props.vertical
  323. ? `
  324. min-width: 108px;
  325. min-height: 108px;
  326. width: 108px;
  327. height: 108px;
  328. `
  329. : `margin-top: 4px;`}
  330. border-radius: 4px;
  331. overflow: hidden;
  332. box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);
  333. }
  334. `;
  335. export const OfferTitleAboveImage = styled(OfferTitle)`
  336. padding-bottom: 12px;
  337. padding-top: 5px;
  338. padding-left: 1px;
  339. display: block;
  340. ${(props) => props.vertical && `display: none;`}
  341. @media (min-width: 551px) {
  342. display: none;
  343. }
  344. `;
  345. export const EyeIcon = styled(Eye)`
  346. width: 12px;
  347. height: 11px;
  348. @media (max-width: 600px) {
  349. position: relative;
  350. top: 1px !important;
  351. }
  352. `;
  353. export const ChatOffer = styled(Box)`
  354. display: flex;
  355. flex-direction: row;
  356. align-items: center;
  357. @media (max-width: 600px) {
  358. display: none;
  359. }
  360. `;
  361. export const OfferText = styled(Box)`
  362. font-family: "Open Sans";
  363. font-size: "12px";
  364. color: ${selectedTheme.primaryText};
  365. `;
  366. export const OfferTextMobile = styled(Box)`
  367. font-family: "Open Sans";
  368. font-size: "12px";
  369. color: ${selectedTheme.primaryText};
  370. `;
  371. export const Commands = styled(Box)`
  372. display: flex;
  373. flex-direction: column;
  374. justify-content: space-between;
  375. align-items: flex-end;
  376. @media (max-width: 600px) {
  377. align-items: flex-start;
  378. }
  379. `;
  380. export const OfferCard = styled(Box)``;
  381. export const ChatInfo = styled(Box)`
  382. height: 100%;
  383. display: flex;
  384. flex-direction: column;
  385. justify-content: space-between;
  386. `;
  387. export const Col = styled(Box)`
  388. display: flex;
  389. align-items: center;
  390. flex-direction: row;
  391. gap: 18px;
  392. `;
  393. export const UserName = styled(Typography)`
  394. margin-bottom: 12px;
  395. font-family: "Open Sans";
  396. color: ${selectedTheme.primaryPurple};
  397. font-weight: 700;
  398. font-size: 24px;
  399. cursor: pointer;
  400. @media (max-width: 600px) {
  401. font-size: 18px;
  402. }
  403. `;
  404. export const LastMessage = styled(Typography)`
  405. font-family: "Open Sans";
  406. color: ${selectedTheme.primaryText};
  407. line-height: 16px;
  408. font-size: 16px;
  409. position: relative;
  410. @media (max-width: 600px) {
  411. display: none;
  412. }
  413. `;
  414. export const LocationContainer = styled(Box)`
  415. display: flex;
  416. flex-direction: row;
  417. gap: 2px;
  418. @media (max-width: 600px) {
  419. display: none;
  420. }
  421. `;
  422. export const LocationIcon = styled(Box)`
  423. height: 12px;
  424. width: auto;
  425. position: relative;
  426. `;
  427. export const XSText = styled(Typography)`
  428. font-family: "Open Sans";
  429. color: ${selectedTheme.primaryText};
  430. line-height: 16px;
  431. font-size: 14px;
  432. position: relative;
  433. `;
  434. export const OfferImage = styled.img`
  435. max-width: 72px;
  436. max-height: 72px;
  437. width: 72px;
  438. height: 72px;
  439. border-radius: 4px;
  440. `;
  441. export const Line = styled(Box)`
  442. border-left: 1px solid rgba(0, 0, 0, 0.15);
  443. height: 100px;
  444. width: 0;
  445. margin: auto 0;
  446. @media (max-width: 600px) {
  447. display: none;
  448. }
  449. `;