From 5efd3938e28c56ea1910094378f16c0726bbd054 Mon Sep 17 00:00:00 2001 From: Josue Date: Fri, 30 Apr 2021 11:13:27 -0400 Subject: [PATCH] refactor: include SELECTED_ANVIL colour in the theme --- striker-ui/components/Anvils/SelectedAnvil.tsx | 9 +++++++-- striker-ui/lib/consts/DEFAULT_THEME.ts | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/striker-ui/components/Anvils/SelectedAnvil.tsx b/striker-ui/components/Anvils/SelectedAnvil.tsx index 87dc13f7..bdf21baf 100644 --- a/striker-ui/components/Anvils/SelectedAnvil.tsx +++ b/striker-ui/components/Anvils/SelectedAnvil.tsx @@ -3,7 +3,12 @@ import { Switch, Box } from '@material-ui/core'; import { ClassNameMap } from '@material-ui/styles'; import { makeStyles } from '@material-ui/core/styles'; import { HeaderText } from '../Text'; -import { BLUE, PURPLE_OFF, RED_ON } from '../../lib/consts/DEFAULT_THEME'; +import { + BLUE, + PURPLE_OFF, + RED_ON, + SELECTED_ANVIL, +} from '../../lib/consts/DEFAULT_THEME'; import anvilState from '../../lib/consts/ANVILS'; import { AnvilContext } from '../AnvilContext'; @@ -11,7 +16,7 @@ const useStyles = makeStyles(() => ({ root: { width: '100%', '&:hover $child': { - backgroundColor: '#00ff00', + backgroundColor: SELECTED_ANVIL, }, }, anvilName: { diff --git a/striker-ui/lib/consts/DEFAULT_THEME.ts b/striker-ui/lib/consts/DEFAULT_THEME.ts index 65a4166c..3b64e7f4 100644 --- a/striker-ui/lib/consts/DEFAULT_THEME.ts +++ b/striker-ui/lib/consts/DEFAULT_THEME.ts @@ -11,3 +11,4 @@ export const GREY = '#E5E5E5'; export const HOVER = '#444'; export const UNSELECTED = '#666'; export const DIVIDER = '#888'; +export const SELECTED_ANVIL = '#00ff00';