From f4a42a8e6d477060a702cebc987c46bb0886e077 Mon Sep 17 00:00:00 2001 From: Josue Date: Wed, 14 Apr 2021 15:27:35 -0400 Subject: [PATCH] feat: add decorator to SelectedAnvil --- .../components/Anvils/SelectedAnvil.tsx | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/striker-ui/components/Anvils/SelectedAnvil.tsx b/striker-ui/components/Anvils/SelectedAnvil.tsx index a19e2df0..1dc637d7 100644 --- a/striker-ui/components/Anvils/SelectedAnvil.tsx +++ b/striker-ui/components/Anvils/SelectedAnvil.tsx @@ -1,20 +1,44 @@ import { useState } from 'react'; -import { Switch, Grid } from '@material-ui/core'; +import { Switch, Box } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import { HeaderText } from '../Text'; +import { BLUE } from '../../lib/consts/DEFAULT_THEME'; + +const useStyles = makeStyles(() => ({ + root: { + width: '100%', + '&:hover $child': { + backgroundColor: '#00ff00', + }, + }, + anvilName: { + paddingLeft: 0, + }, + decorator: { + width: '20px', + height: '100%', + backgroundColor: BLUE, + borderRadius: 2, + }, +})); const SelectedAnvil = ({ anvil }: { anvil: AnvilListItem }): JSX.Element => { + const classes = useStyles(); const [checked, setChecked] = useState(true); return ( - <> - + + +
+ + - - + + setChecked(!checked)} /> - - + + ); };