Merge pull request #3007 from omnivore-app/feat/web-add-flair-titles

Add titles to the flair icons
This commit is contained in:
Jackson Harper 2023-10-24 18:21:16 +08:00 committed by GitHub
commit 747038ec0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,16 +101,36 @@ export const FLAIR_ICON_NAMES = [
const flairIconForLabel = (label: Label): JSX.Element | undefined => {
switch (label.name.toLocaleLowerCase()) {
case 'favorite':
return <FavoriteFlairIcon />
return (
<SpanBox title="Favorite">
<FavoriteFlairIcon />
</SpanBox>
)
case 'pinned':
return <PinnedFlairIcon />
return (
<SpanBox title="Pinned">
<PinnedFlairIcon />
</SpanBox>
)
case 'recommended':
return <RecommendedFlairIcon />
return (
<SpanBox title="Recommended">
<RecommendedFlairIcon />
</SpanBox>
)
case 'newsletter':
return <NewsletterFlairIcon />
return (
<SpanBox title="Newsletter">
<NewsletterFlairIcon />
</SpanBox>
)
case 'rss':
case 'feed':
return <FeedFlairIcon />
return (
<SpanBox title="Feed">
<FeedFlairIcon />
</SpanBox>
)
}
return undefined
}