Переглянути джерело

change font weight on deatils and selected

master
azri 1 тиждень тому
джерело
коміт
c592234117

+ 31
- 8
src/components/ProductDetails/ProductDetails.jsx Переглянути файл

@@ -208,7 +208,13 @@ const ProductDetails = () => {
208 208
       <Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
209 209
         {/* Section 1: Product Info */}
210 210
         <Box>
211
-          <Typography variant="h5" sx={{ fontWeight: "bold", mb: 2 }}>
211
+          <Typography variant="body2" sx={{
212
+            fontWeight: "400", fontSize: {
213
+              xs: "0.875rem",
214
+              sm: "0.875rem",
215
+              md: "1.1rem",
216
+            }
217
+          }}>
212 218
             {product?.title}
213 219
           </Typography>
214 220
           {/* <Typography variant="body2" color="text.secondary">
@@ -216,10 +222,13 @@ const ProductDetails = () => {
216 222
           </Typography> */}
217 223
 
218 224
 
219
-          <Typography
220
-            variant="body1"
221
-            sx={{ fontWeight: "bold" }}
222
-          >
225
+          <Typography variant="body2" sx={{
226
+            fontWeight: "100", fontSize: {
227
+              xs: "0.875rem",
228
+              sm: "0.875rem",
229
+              md: "1.1rem",
230
+            }
231
+          }}>
223 232
             {(variantSelection?.quantityAvailable == 0) ? <span style={{ color: "red", fontWeight: "bolder" }}>{`OUT OF STOCK`}</span> : `${variantSelection.currencyCode} ${parseFloat(variantSelection.amount).toFixed(2)}`}
224 233
           </Typography>
225 234
 
@@ -232,14 +241,21 @@ const ProductDetails = () => {
232 241
 
233 242
             return (
234 243
               <Box sx={{ display: (name == "Title") ? "none" : "block" }}>
235
-                <Typography variant="body1" sx={{ fontWeight: "bold", color: "#000", mb: 1 }}>
244
+                <Typography variant="body2" sx={{
245
+                  fontWeight: "100", fontSize: {
246
+                    xs: "0.875rem",
247
+                    sm: "0.875rem",
248
+                    md: "1.1rem",
249
+                  },
250
+                  mb:1
251
+                }}>
236 252
                   {name}
237 253
                 </Typography>
238 254
 
239 255
                 <Box sx={{
240 256
                   display: "flex",
241 257
                   flexWrap: "wrap",
242
-                  
258
+
243 259
                   mb: 2
244 260
                 }} gap={2}>
245 261
                   {options?.map((value) => (
@@ -264,7 +280,14 @@ const ProductDetails = () => {
264 280
 
265 281
         {/* Section 3: Quantity */}
266 282
         <Box sx={{ mb: 5 }}>
267
-          <Typography variant="body1" sx={{ fontWeight: "bold", color: "#000", mb: 2 }}>
283
+          <Typography variant="body2" sx={{
284
+            fontWeight: "100", fontSize: {
285
+              xs: "0.875rem",
286
+              sm: "0.875rem",
287
+              md: "1.1rem",
288
+            },
289
+            mb:1
290
+          }}>
268 291
             Quantity
269 292
           </Typography>
270 293
           <Box display="flex" alignItems="center" gap={2}>

+ 29
- 5
src/components/SearchProduct/SearchProduct.jsx Переглянути файл

@@ -3,7 +3,7 @@ import Grid from '@mui/material/Grid2';
3 3
 import { Box, Button, TextField, InputAdornment, Typography, Card, CardContent, CardMedia } from '@mui/material';
4 4
 import { useSelector } from 'react-redux';
5 5
 
6
-const SearchProduct = ({onClose}) => {
6
+const SearchProduct = ({ onClose }) => {
7 7
 
8 8
     const products = useSelector((state) => state.products.products.data)
9 9
     const [searchedProducts, setSearchedProducts] = useState([]);
@@ -108,9 +108,9 @@ const SearchProduct = ({onClose}) => {
108 108
                                     borderBottom: "1px solid rgba(0,0,0,0.2)",
109 109
                                     transition: "all 0.3s ease-in-out",
110 110
                                     ":hover": {
111
-                                      backgroundColor: "#95AAC5"
111
+                                        backgroundColor: "#95AAC5"
112 112
                                     }
113
-                                  }}
113
+                                }}
114 114
                                 onClick={() => {
115 115
                                     window.location.href = `/products/${product?.handle}`
116 116
                                 }}
@@ -121,8 +121,32 @@ const SearchProduct = ({onClose}) => {
121 121
                                     image={product?.images[0]?.url}
122 122
                                     alt={product?.title}
123 123
                                 />
124
-                                <CardContent sx={{ flex: '1 0 auto' }}>
125
-                                    <Typography variant="h5">{product?.title}</Typography>
124
+                                <CardContent>
125
+                                    <Typography variant="body2" sx={{
126
+                                        fontWeight: "100", fontSize: {
127
+                                            xs: "0.875rem",
128
+                                            sm: "0.875rem",
129
+                                            md: "1.1rem",
130
+                                        }
131
+                                    }}>
132
+                                        {`${product?.collections[0]?.title}`}
133
+                                    </Typography>
134
+                                    <Typography variant="body2" sx={{
135
+                                        fontWeight: "400", fontSize: {
136
+                                            xs: "0.875rem",
137
+                                            sm: "0.875rem",
138
+                                            md: "1.1rem",
139
+                                        },
140
+                                    }}>{product?.title}</Typography>
141
+                                    <Typography variant="body2" sx={{
142
+                                        fontWeight: "100", fontSize: {
143
+                                            xs: "0.875rem",
144
+                                            sm: "0.875rem",
145
+                                            md: "1.1rem",
146
+                                        }
147
+                                    }}>
148
+                                        {`${product?.minVariantPrice?.currencyCode} ${parseFloat(product?.minVariantPrice?.amount).toFixed(2)}`}
149
+                                    </Typography>
126 150
                                 </CardContent>
127 151
                             </Card>
128 152
                         </Grid>

Завантаження…
Відмінити
Зберегти