Skip to content

Commit 3b23dd6

Browse files
committed
Fix feedback star rating visibility in dark mode (selected stars in yellow)
1 parent 77c84af commit 3b23dd6

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

src/components/CommunityPortal/Activities/activityId/ActivityComments.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,18 +609,16 @@ function ActivityComments() {
609609

610610
const renderStars = (rating, isInteractive = false, onRatingChange = null) => {
611611
return (
612-
<div style={{ display: 'flex', gap: '2px' }}>
612+
<div className={styles.feedbackStarsContainer}>
613613
{[1, 2, 3, 4, 5].map(star => (
614614
<button
615615
key={star}
616616
type="button"
617+
className={`${styles.feedbackStarBtn} ${
618+
star <= rating ? styles.feedbackStarSelected : ''
619+
}`}
617620
style={{
618-
fontSize: '1.2rem',
619-
color: star <= rating ? '#ffc107' : '#ddd',
620621
cursor: isInteractive ? 'pointer' : 'default',
621-
background: 'none',
622-
border: 'none',
623-
padding: 0,
624622
}}
625623
onClick={() => isInteractive && onRatingChange && onRatingChange(star)}
626624
disabled={!isInteractive}

src/components/CommunityPortal/Activities/activityId/ActivityComments.module.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,23 @@
791791
flex: 1;
792792
}
793793

794+
.feedbackStarsContainer {
795+
display: flex;
796+
gap: 2px;
797+
}
798+
799+
.feedbackStarBtn {
800+
font-size: 1.2rem;
801+
background: none;
802+
border: none;
803+
padding: 0;
804+
color: #ddd;
805+
}
806+
807+
.feedbackStarBtn.feedbackStarSelected {
808+
color: #ffc107;
809+
}
810+
794811
.feedbackRatingLabel {
795812
font-size: 0.9rem;
796813
color: #666;
@@ -862,6 +879,16 @@
862879
color: #b8c5d1 !important;
863880
}
864881

882+
:global(body.dark-mode) .feedbackStarBtn,
883+
:global(body.bm-dashboard-dark) .feedbackStarBtn {
884+
color: #6b7c8a !important;
885+
}
886+
887+
:global(body.dark-mode) .feedbackStarBtn.feedbackStarSelected,
888+
:global(body.bm-dashboard-dark) .feedbackStarBtn.feedbackStarSelected {
889+
color: #ffc107 !important;
890+
}
891+
865892
:global(body.dark-mode) .feedbackRatingText,
866893
:global(body.bm-dashboard-dark) .feedbackRatingText {
867894
color: #b8c5d1 !important;

0 commit comments

Comments
 (0)