Browse Source

change font weight on deatils and selected

master
azri 1 week ago
parent
commit
c592234117

+ 31
- 8
src/components/ProductDetails/ProductDetails.jsx View File

208
       <Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
208
       <Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
209
         {/* Section 1: Product Info */}
209
         {/* Section 1: Product Info */}
210
         <Box>
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
             {product?.title}
218
             {product?.title}
213
           </Typography>
219
           </Typography>
214
           {/* <Typography variant="body2" color="text.secondary">
220
           {/* <Typography variant="body2" color="text.secondary">
216
           </Typography> */}
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
             {(variantSelection?.quantityAvailable == 0) ? <span style={{ color: "red", fontWeight: "bolder" }}>{`OUT OF STOCK`}</span> : `${variantSelection.currencyCode} ${parseFloat(variantSelection.amount).toFixed(2)}`}
232
             {(variantSelection?.quantityAvailable == 0) ? <span style={{ color: "red", fontWeight: "bolder" }}>{`OUT OF STOCK`}</span> : `${variantSelection.currencyCode} ${parseFloat(variantSelection.amount).toFixed(2)}`}
224
           </Typography>
233
           </Typography>
225
 
234
 
232
 
241
 
233
             return (
242
             return (
234
               <Box sx={{ display: (name == "Title") ? "none" : "block" }}>
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
                   {name}
252
                   {name}
237
                 </Typography>
253
                 </Typography>
238
 
254
 
239
                 <Box sx={{
255
                 <Box sx={{
240
                   display: "flex",
256
                   display: "flex",
241
                   flexWrap: "wrap",
257
                   flexWrap: "wrap",
242
-                  
258
+
243
                   mb: 2
259
                   mb: 2
244
                 }} gap={2}>
260
                 }} gap={2}>
245
                   {options?.map((value) => (
261
                   {options?.map((value) => (
264
 
280
 
265
         {/* Section 3: Quantity */}
281
         {/* Section 3: Quantity */}
266
         <Box sx={{ mb: 5 }}>
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
             Quantity
291
             Quantity
269
           </Typography>
292
           </Typography>
270
           <Box display="flex" alignItems="center" gap={2}>
293
           <Box display="flex" alignItems="center" gap={2}>

+ 29
- 5
src/components/SearchProduct/SearchProduct.jsx View File

3
 import { Box, Button, TextField, InputAdornment, Typography, Card, CardContent, CardMedia } from '@mui/material';
3
 import { Box, Button, TextField, InputAdornment, Typography, Card, CardContent, CardMedia } from '@mui/material';
4
 import { useSelector } from 'react-redux';
4
 import { useSelector } from 'react-redux';
5
 
5
 
6
-const SearchProduct = ({onClose}) => {
6
+const SearchProduct = ({ onClose }) => {
7
 
7
 
8
     const products = useSelector((state) => state.products.products.data)
8
     const products = useSelector((state) => state.products.products.data)
9
     const [searchedProducts, setSearchedProducts] = useState([]);
9
     const [searchedProducts, setSearchedProducts] = useState([]);
108
                                     borderBottom: "1px solid rgba(0,0,0,0.2)",
108
                                     borderBottom: "1px solid rgba(0,0,0,0.2)",
109
                                     transition: "all 0.3s ease-in-out",
109
                                     transition: "all 0.3s ease-in-out",
110
                                     ":hover": {
110
                                     ":hover": {
111
-                                      backgroundColor: "#95AAC5"
111
+                                        backgroundColor: "#95AAC5"
112
                                     }
112
                                     }
113
-                                  }}
113
+                                }}
114
                                 onClick={() => {
114
                                 onClick={() => {
115
                                     window.location.href = `/products/${product?.handle}`
115
                                     window.location.href = `/products/${product?.handle}`
116
                                 }}
116
                                 }}
121
                                     image={product?.images[0]?.url}
121
                                     image={product?.images[0]?.url}
122
                                     alt={product?.title}
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
                                 </CardContent>
150
                                 </CardContent>
127
                             </Card>
151
                             </Card>
128
                         </Grid>
152
                         </Grid>

Loading…
Cancel
Save