aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-04 16:46:22 +0200
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-04 16:46:22 +0200
commit4346b0c0871c856d27c9ba088dcaf0e084552b12 (patch)
tree9f6fdf49ec73a53f5f6f76f2a9f15cc71a118677
parentclose workspace drawer after clicking on a workspace (diff)
downloadferdium-app-4346b0c0871c856d27c9ba088dcaf0e084552b12.tar.gz
ferdium-app-4346b0c0871c856d27c9ba088dcaf0e084552b12.tar.zst
ferdium-app-4346b0c0871c856d27c9ba088dcaf0e084552b12.zip
add hover effect for drawer workspace items
-rw-r--r--packages/theme/src/themes/dark/index.ts1
-rw-r--r--packages/theme/src/themes/default/index.ts1
-rw-r--r--src/features/workspaces/components/WorkspaceDrawerItem.js6
3 files changed, 8 insertions, 0 deletions
diff --git a/packages/theme/src/themes/dark/index.ts b/packages/theme/src/themes/dark/index.ts
index cb7ffc1cf..1c0ede8e5 100644
--- a/packages/theme/src/themes/dark/index.ts
+++ b/packages/theme/src/themes/dark/index.ts
@@ -69,6 +69,7 @@ export const workspaceDrawerBackground = color(colorBackground).lighten(0.3).hex
69export const workspaceDrawerAddButtonColor = legacyStyles.darkThemeGrayLighter; 69export const workspaceDrawerAddButtonColor = legacyStyles.darkThemeGrayLighter;
70export const workspaceDrawerAddButtonHoverColor = legacyStyles.darkThemeGraySmoke; 70export const workspaceDrawerAddButtonHoverColor = legacyStyles.darkThemeGraySmoke;
71export const workspaceDrawerItemBorder = color(workspaceDrawerBackground).lighten(0.2).hex(); 71export const workspaceDrawerItemBorder = color(workspaceDrawerBackground).lighten(0.2).hex();
72export const workspaceDrawerItemHoverBackground = color(workspaceDrawerBackground).lighten(0.2).hex();
72export const workspaceDrawerItemActiveBackground = defaultStyles.brandPrimary; 73export const workspaceDrawerItemActiveBackground = defaultStyles.brandPrimary;
73export const workspaceDrawerItemNameColor = colorText; 74export const workspaceDrawerItemNameColor = colorText;
74export const workspaceDrawerItemNameActiveColor = 'white'; 75export const workspaceDrawerItemNameActiveColor = 'white';
diff --git a/packages/theme/src/themes/default/index.ts b/packages/theme/src/themes/default/index.ts
index f2632ee20..718ccf485 100644
--- a/packages/theme/src/themes/default/index.ts
+++ b/packages/theme/src/themes/default/index.ts
@@ -149,6 +149,7 @@ export const workspaceDrawerPadding = 20;
149export const workspaceDrawerBackground = color(colorBackground).lighten(0.1).hex(); 149export const workspaceDrawerBackground = color(colorBackground).lighten(0.1).hex();
150export const workspaceDrawerAddButtonColor = legacyStyles.themeGrayLight; 150export const workspaceDrawerAddButtonColor = legacyStyles.themeGrayLight;
151export const workspaceDrawerAddButtonHoverColor = color(legacyStyles.themeGrayLight).lighten(0.1).hex(); 151export const workspaceDrawerAddButtonHoverColor = color(legacyStyles.themeGrayLight).lighten(0.1).hex();
152export const workspaceDrawerItemHoverBackground = color(workspaceDrawerBackground).darken(0.01).hex();
152export const workspaceDrawerItemActiveBackground = legacyStyles.themeGrayLightest; 153export const workspaceDrawerItemActiveBackground = legacyStyles.themeGrayLightest;
153export const workspaceDrawerItemBorder = color(workspaceDrawerBackground).darken(0.05).hex(); 154export const workspaceDrawerItemBorder = color(workspaceDrawerBackground).darken(0.05).hex();
154export const workspaceDrawerItemNameColor = colorText; 155export const workspaceDrawerItemNameColor = colorText;
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js
index 1e28ebea6..17a7882b8 100644
--- a/src/features/workspaces/components/WorkspaceDrawerItem.js
+++ b/src/features/workspaces/components/WorkspaceDrawerItem.js
@@ -20,9 +20,15 @@ const styles = theme => ({
20 '&:first-child': { 20 '&:first-child': {
21 borderTop: `1px solid ${theme.workspaceDrawerItemBorder}`, 21 borderTop: `1px solid ${theme.workspaceDrawerItemBorder}`,
22 }, 22 },
23 '&:hover': {
24 backgroundColor: theme.workspaceDrawerItemHoverBackground,
25 },
23 }, 26 },
24 isActiveItem: { 27 isActiveItem: {
25 backgroundColor: theme.workspaceDrawerItemActiveBackground, 28 backgroundColor: theme.workspaceDrawerItemActiveBackground,
29 '&:hover': {
30 backgroundColor: theme.workspaceDrawerItemActiveBackground,
31 },
26 }, 32 },
27 name: { 33 name: {
28 marginTop: '4px', 34 marginTop: '4px',