Skip to content

Commit 87244eb

Browse files
committed
refactor: update RepoFeedItem styles and structure for improved readability and consistency
1 parent 4ec8006 commit 87244eb

2 files changed

Lines changed: 28 additions & 15 deletions

File tree

src/features/feed/components/feed.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,29 @@
2323
display: flex;
2424
flex-direction: column;
2525
gap: 12px;
26-
background: white;
26+
background: var(--card-background-color);
2727
border-bottom: 12px solid green;
2828
}
2929
.feedItem .repo .title {
3030
font-size: 24px;
31-
color: black;
31+
color: var(--card-header-text-color);
3232
margin: 0;
3333
padding: 0;
3434
}
3535
.feedItem .repo .description {
36-
font-size: 24px;
37-
color: black;
36+
font-size: 16px;
37+
color: var(--primary-text-color);
38+
margin: 0;
39+
padding: 0 12px;
40+
text-align: center;
41+
}
42+
.feedItem .repo .details {
43+
display: flex;
44+
flex-direction: row;
45+
gap: 8px;
46+
font-size: 14px;
47+
}
48+
.feedItem .repo .details p {
3849
margin: 0;
3950
padding: 0;
4051
}

src/features/feed/components/feedItems/RepoFeedItem.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,26 @@ export const RepoFeedItem = (props: BaseItemPropsType<FeedItemType>) => {
2525
item={item}
2626
fallbackImage={
2727
<div className="rowCover repo">
28-
<SiGithub size={40} color="#000" />
28+
<SiGithub size={40} />
2929
<p className="title">{item.title}</p>
30-
<p
31-
style={{
32-
textAlign: 'center',
33-
color: 'gray',
34-
margin: 0,
35-
padding: 0,
36-
}}>
37-
{item.description}
38-
</p>
30+
<p className="description">{item.description}</p>
31+
<div className="details">
32+
<p>
33+
<VscStarFull className="rowItemIcon" /> {numberWithCommas(item.stars || 0)}{' '}
34+
stars
35+
</p>
36+
<p>
37+
<VscRepoForked className="rowItemIcon" /> {numberWithCommas(item?.forks || 0)}{' '}
38+
forks
39+
</p>
40+
</div>
3941
</div>
4042
}
4143
/>
4244

4345
{listingMode === 'normal' && (
4446
<div className="rowDetails">
45-
{numberWithCommas(item.stars || 0) && (
47+
{item.stars && (
4648
<span className="rowItem">
4749
<VscStarFull className="rowItemIcon" /> {numberWithCommas(item.stars || 0)} stars
4850
</span>

0 commit comments

Comments
 (0)