Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ItemDetailsCard.styled.js 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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 HorizontalScroller from "../../Scroller/HorizontalScroller";
  8. import { ReactComponent as Category } from "../../../assets/images/svg/category.svg";
  9. import { ReactComponent as Subcategory } from "../../../assets/images/svg/subcategory.svg";
  10. import { ReactComponent as Quantity } from "../../../assets/images/svg/quantity.svg";
  11. import { ReactComponent as Eye } from "../../../assets/images/svg/eye-striked.svg";
  12. import { IconButton } from "../../Buttons/IconButton/IconButton";
  13. import { ReactComponent as Edit } from "../../../assets/images/svg/edit.svg";
  14. import { ReactComponent as Remove } from "../../../assets/images/svg/trash.svg";
  15. export const ItemDetailsCardContainer = styled(Container)`
  16. display: flex;
  17. flex-direction: column;
  18. width: ${(props) => (!props.halfwidth ? "100%" : "49%")};
  19. box-sizing: border-box;
  20. margin: 10px 0;
  21. border: 1px solid ${selectedTheme.borderNormal};
  22. background-color: ${(props) =>
  23. props.sponsored === "true"
  24. ? selectedTheme.backgroundSponsoredColor
  25. : "white"};
  26. border-radius: 4px;
  27. padding: 18px;
  28. max-width: 2000px;
  29. position: relative;
  30. width: 100%;
  31. /* padding-bottom: 70px; */
  32. @media (max-width: 600px) {
  33. padding: 10px;
  34. padding-bottom: 65px;
  35. }
  36. `;
  37. export const OfferInfo = styled(Box)`
  38. display: flex;
  39. flex: 2;
  40. flex-direction: row;
  41. justify-content: space-between;
  42. margin: 18px 0;
  43. @media (max-width: 600px) {
  44. margin: 0;
  45. }
  46. `;
  47. export const DateEditDeleteContainer = styled(Box)`
  48. display: flex;
  49. align-items: center;
  50. `;
  51. export const EditIconContainer = styled(IconButton)`
  52. width: 40px;
  53. height: 40px;
  54. background-color: ${selectedTheme.primaryIconBackgroundColor};
  55. border-radius: 100%;
  56. padding-top: 2px;
  57. text-align: center;
  58. margin-left: 18px;
  59. `;
  60. export const EditIcon = styled(Edit)``;
  61. export const RemoveIconContainer = styled(IconButton)`
  62. width: 40px;
  63. height: 40px;
  64. background-color: ${selectedTheme.primaryIconBackgroundColor};
  65. border-radius: 100%;
  66. padding-top: 2px;
  67. text-align: center;
  68. margin-left: 18px;
  69. `;
  70. export const RemoveIcon = styled(Remove)``;
  71. export const PostDate = styled(Typography)`
  72. font-family: "Open Sans";
  73. font-size: 12px;
  74. color: ${selectedTheme.primaryText};
  75. &::before {
  76. content: "Objavljeno: ";
  77. @media (max-width: 600px) {
  78. font-size: 9px;
  79. font-family: "Open Sans";
  80. }
  81. }
  82. @media (max-width: 600px) {
  83. position: absolute;
  84. bottom: 23px;
  85. left: 18px;
  86. width: 70px;
  87. }
  88. `;
  89. export const Info = styled(Box)`
  90. display: flex;
  91. gap: 18px;
  92. @media (max-width: 600px) {
  93. flex: 1;
  94. gap: 0;
  95. justify-content: space-between;
  96. margin-bottom: 15px;
  97. max-width: 92%;
  98. position: relative;
  99. left: 5px;
  100. }
  101. `;
  102. export const OfferTitle = styled(Typography)`
  103. font-family: "Open Sans";
  104. flex: 1;
  105. color: ${selectedTheme.primaryPurple};
  106. font-weight: 700;
  107. font-size: 24px;
  108. padding: 0 60px;
  109. @media screen and (max-width: 600px) {
  110. padding: 0;
  111. font-size: 18px;
  112. }
  113. `;
  114. export const OfferImage = styled.img`
  115. min-width: 144px;
  116. min-height: 144px;
  117. width: 144px;
  118. height: 144px;
  119. margin-right: 20px;
  120. object-fit: cover;
  121. @media screen and (max-width: 600px) {
  122. min-width: 144px;
  123. margin-right: 13px;
  124. }
  125. `;
  126. export const OfferAuthor = styled(Box)`
  127. display: flex;
  128. flex: 1;
  129. flex-direction: column;
  130. `;
  131. export const OfferAuthorName = styled(Typography)`
  132. font-family: "Open Sans";
  133. line-height: 22px;
  134. font-size: 16px;
  135. color: ${selectedTheme.primaryDarkText};
  136. `;
  137. export const OfferLocation = styled(Typography)`
  138. font-family: "Open Sans";
  139. color: ${selectedTheme.primaryText};
  140. line-height: 16px;
  141. font-size: 12px;
  142. `;
  143. export const OfferDetails = styled(Box)`
  144. display: flex;
  145. flex-direction: column;
  146. flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
  147. justify-content: space-between;
  148. padding: 0 60px;
  149. @media (max-width: 600px) {
  150. padding: 0;
  151. }
  152. `;
  153. export const OfferCategory = styled(Box)`
  154. font-family: "Open Sans";
  155. color: ${selectedTheme.primaryText};
  156. line-height: 16px;
  157. font-size: 12px;
  158. width: 33%;
  159. `;
  160. export const OfferPackage = styled(Box)`
  161. font-family: "Open Sans";
  162. color: ${selectedTheme.primaryText};
  163. line-height: 16px;
  164. font-size: 12px;
  165. width: 34%;
  166. `;
  167. export const OfferViews = styled(Box)`
  168. font-family: "Open Sans";
  169. color: ${selectedTheme.primaryText};
  170. line-height: 16px;
  171. font-size: 12px;
  172. width: 34%;
  173. `;
  174. export const OfferDescriptionTitle = styled(Box)`
  175. font-family: "Open Sans";
  176. font-size: 12px;
  177. color: ${selectedTheme.primaryDarkText};
  178. line-height: 16px;
  179. @media (max-width: 600px) {
  180. font-size: 9px;
  181. line-height: 13px;
  182. }
  183. `;
  184. export const OfferDescriptionText = styled(Box)`
  185. font-family: "Open Sans";
  186. font-size: 16px;
  187. color: ${selectedTheme.primaryDarkText};
  188. line-height: 22px;
  189. padding-bottom: 20px;
  190. max-width: ${(props) =>
  191. props.showBarterButton ? "calc(100% - 230px)" : "100%"};
  192. @media (max-width: 600px) {
  193. font-size: 14px;
  194. max-width: 100%;
  195. max-height: 100px;
  196. }
  197. /* max-width: calc(100% - 230px); */
  198. /* overflow: hidden; */
  199. /* display: -webkit-box;
  200. -webkit-line-clamp: 5;
  201. -webkit-box-orient: vertical; */
  202. `;
  203. export const OfferDescription = styled(Box)`
  204. flex: 3;
  205. `;
  206. export const Line = styled(Box)`
  207. border-left: 1px solid rgba(0, 0, 0, 0.15);
  208. height: 100px;
  209. width: 0;
  210. margin: auto 0;
  211. `;
  212. export const DetailIcon = styled(Icon)`
  213. & svg {
  214. width: 14px;
  215. position: relative;
  216. top: -1px;
  217. }
  218. `;
  219. export const DetailText = styled(Typography)`
  220. font-family: "Open Sans";
  221. color: ${selectedTheme.primaryText};
  222. line-height: 16px;
  223. font-size: 12px;
  224. position: relative;
  225. top: -2px;
  226. left: 3px;
  227. `;
  228. export const CheckButton = styled(PrimaryButton)`
  229. width: 180px;
  230. height: 48px;
  231. position: absolute;
  232. bottom: 9px;
  233. right: 12px;
  234. font-weight: 600;
  235. &:hover button {
  236. background-color: ${selectedTheme.primaryPurple} !important;
  237. color: white !important;
  238. }
  239. @media (max-width: 600px) {
  240. height: 44px;
  241. }
  242. `;
  243. export const Details = styled(Box)`
  244. display: flex;
  245. flex-direction: column;
  246. gap: 12px;
  247. ${(props) => props.hasScrollBar && !props.exchange && `height: 300px;`}
  248. overflow-y: auto;
  249. overflow-x: hidden;
  250. ::-webkit-scrollbar {
  251. width: 5px;
  252. }
  253. ::-webkit-scrollbar-thumb {
  254. background: #c4c4c4;
  255. border-radius: 3px;
  256. }
  257. @media screen and (max-width: 600px) {
  258. margin-top: 15px;
  259. ${(props) =>
  260. !props.hasScrollBar &&
  261. props.exchange &&
  262. `
  263. overflow: hidden;
  264. max-height: none;`}
  265. }
  266. `;
  267. // export const OfferImage = styled.img`
  268. // `
  269. export const Scroller = styled(HorizontalScroller)`
  270. min-height: 144px;
  271. min-width: 144px;
  272. max-width: 100%;
  273. /* & div {
  274. margin: 0 9px;
  275. } */
  276. `;
  277. export const PublishButtonContainer = styled(Box)`
  278. display: flex;
  279. justify-content: center;
  280. margin-bottom: 30px;
  281. `;
  282. export const CategoryIcon = styled(Category)`
  283. width: 14px;
  284. `;
  285. export const SubcategoryIcon = styled(Subcategory)`
  286. width: 14px;
  287. `;
  288. export const QuantityIcon = styled(Quantity)`
  289. width: 22px;
  290. height: 16px;
  291. `;
  292. export const EyeIcon = styled(Eye)`
  293. width: 18px;
  294. height: 20px;
  295. `;