Skip to content

Commit

Permalink
restore hover effect from commafeed v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Apr 27, 2023
1 parent 9ccc26b commit 4bea1c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions commafeed-client/src/components/content/FeedEntry.tsx
Expand Up @@ -32,6 +32,11 @@ const useStyles = createStyles((theme, props: FeedEntryProps & { viewMode?: View
if (props.viewMode === "title") mobileMarginY = 2
else if (props.viewMode === "cozy") mobileMarginY = 4

let backgroundHoverColor = backgroundColor
if (!props.expanded) {
backgroundHoverColor = theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.colors.gray[0]
}

const styles = {
paper: {
backgroundColor,
Expand All @@ -41,6 +46,9 @@ const useStyles = createStyles((theme, props: FeedEntryProps & { viewMode?: View
marginTop: mobileMarginY,
marginBottom: mobileMarginY,
},
"&:hover": {
backgroundColor: backgroundHoverColor,
},
},
body: {
maxWidth: Constants.layout.entryMaxWidth,
Expand Down

0 comments on commit 4bea1c5

Please sign in to comment.