This commit is contained in:
insvrgent
2025-02-13 11:52:27 +07:00
parent 2ceac51de2
commit e9cf1a159a
2 changed files with 49 additions and 36 deletions

View File

@@ -168,7 +168,8 @@ const Item = ({
lineHeight: '1rem', lineHeight: '1rem',
marginLeft: 10 marginLeft: 10
}}> }}>
{promoPrice && promoPrice != 0 && promoPrice != '' && {promoPrice && promoPrice != 0 && promoPrice != '' ?
<>
<div style={{ <div style={{
position: 'relative', position: 'relative',
marginTop: '0.125rem', marginTop: '0.125rem',
@@ -184,9 +185,9 @@ const Item = ({
fontWeight: 600, fontWeight: 600,
lineHeight: '1rem' lineHeight: '1rem'
}}> }}>
Promo Promo {(((initialPrice - promoPrice) / initialPrice) * 100).toFixed(0)}%
</div> </div>
}
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<span style={{ <span style={{
marginLeft: '1rem', marginLeft: '1rem',
@@ -199,6 +200,18 @@ const Item = ({
textDecoration: 'line-through' textDecoration: 'line-through'
}}>{initialPrice}</span> }}>{initialPrice}</span>
</div> </div>
</>
:
<>
<div style={{ display: 'flex' }}>
<span style={{
marginRight: '0.5rem',
marginTop: '0.125rem'
}}>{initialPrice}</span>
</div>
</>
}
</div> </div>
)} )}
@@ -250,7 +263,7 @@ const Item = ({
<div className={styles.itemQty}> <div className={styles.itemQty}>
<button <button
className={styles.addButton} className={styles.addButton}
style={{ backgroundColor: !isAvailable ? "" : "inherit", border: `2px solid ${isAvailable ? 'inherit' : 'gray'}`, color: `${isAvailable ? '#73a585' : 'gray'}` }} style={{ backgroundColor: !isAvailable ? "" : "inherit", border: `2px solid ${isAvailable ? 'inherit' : 'gray'}`, color: `${isAvailable ? '#a8c7a9' : 'gray'}` }}
onClick={handlePlusClick} onClick={handlePlusClick}
disabled={!isAvailable} // Optionally disable the button if not available disabled={!isAvailable} // Optionally disable the button if not available
> >
@@ -264,7 +277,7 @@ const Item = ({
style={{ style={{
backgroundColor: "white", backgroundColor: "white",
width: "150px", width: "150px",
color: '#73a585' color: '#a8c7a9'
}} }}
onClick={isBeingEdit ? handleUpdate : handleCreate} onClick={isBeingEdit ? handleUpdate : handleCreate}
> >

View File

@@ -153,8 +153,8 @@
align-items: center; align-items: center;
font-size: 0.9rem; font-size: 0.9rem;
margin-left: 5px; margin-left: 5px;
color: rgb(115, 165, 133); color: #a8c7a9;
fill: rgb(115, 165, 133); fill: #a8c7a9;
height: 40px; height: 40px;
} }
@@ -182,7 +182,7 @@
.addButton { .addButton {
background-color: #ffffff; background-color: #ffffff;
border: 2px solid #73a585; border: 2px solid #a8c7a9;
/* border: none; */ /* border: none; */
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;