From d7bd977503e122334f2cea4b33212a28521752e8 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Fri, 11 Aug 2023 22:26:54 -0400 Subject: [PATCH] message hover effect --- src/components/Message.tsx | 6 +++++- src/contexts/Theme.tsx | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Message.tsx b/src/components/Message.tsx index 1d9e478e..4fc0eebc 100644 --- a/src/components/Message.tsx +++ b/src/components/Message.tsx @@ -12,9 +12,13 @@ const MessageListItem = styled.li``; const Container = styled.div<{ isHeader?: boolean }>` display: flex; flex-direction: row; - padding: 2px 12px; + padding: ${(props) => (props.isHeader ? "4" : "2")}px 12px; align-items: center; margin-top: ${(props) => (props.isHeader ? "20px" : undefined)}; + + &:hover { + background-color: var(--background-primary-highlight); + } `; const MessageContentContainer = styled.div<{ isHeader?: boolean }>` diff --git a/src/contexts/Theme.tsx b/src/contexts/Theme.tsx index 00cd26a4..1a2f671f 100644 --- a/src/contexts/Theme.tsx +++ b/src/contexts/Theme.tsx @@ -5,6 +5,7 @@ import { useAppStore } from "../stores/AppStore"; export type ThemeVariables = | "backgroundPrimary" | "backgroundPrimaryAlt" + | "backgroundPrimaryHighlight" | "backgroundSecondary" | "backgroundSecondaryAlt" | "backgroundSecondaryHighlight" @@ -52,6 +53,7 @@ export const ThemePresets: Record = { light: { backgroundPrimary: "#ffffff", backgroundPrimaryAlt: "", + backgroundPrimaryHighlight: "", backgroundSecondary: "#ebe5e4", backgroundSecondaryAlt: "#ebe5e4", backgroundSecondaryHighlight: "#ebe5e4", @@ -90,6 +92,7 @@ export const ThemePresets: Record = { dark: { backgroundPrimary: "#2e2e2e", backgroundPrimaryAlt: "#2a2a2a", + backgroundPrimaryHighlight: "#262626", backgroundSecondary: "#232323", backgroundSecondaryAlt: "#1e1e1e", backgroundSecondaryHighlight: "#383838",