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.

ItemDetailsCard.styled.js 7.1KB

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