From 45a226b4b86c467474a9ea686a67cfb25b7de775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciek=20G=C5=82owacki?= Date: Mon, 28 Sep 2020 18:54:53 +0200 Subject: [PATCH] Hover state of close icon --- src/components/CourseCard.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/CourseCard.tsx b/src/components/CourseCard.tsx index dad01fe..36cc7dd 100644 --- a/src/components/CourseCard.tsx +++ b/src/components/CourseCard.tsx @@ -5,7 +5,7 @@ import { Course, Group } from '../types/index'; import { coursesContext } from '../contexts/CoursesProvider'; import styled from 'styled-components'; import { makeStyles } from '@material-ui/core/styles'; -import CloseIcon from '../assets/close.svg'; +import { ReactComponent as CloseIcon } from '../assets/close.svg'; interface ClassExandIconProps { isSelected: boolean; @@ -24,7 +24,7 @@ const CourseStyled = styled.div` border-radius: 10px; cursor: pointer; align-items: stretch; - position:relative; + position: relative; `; const CourseNameStyled = styled.div` @@ -69,14 +69,14 @@ const useStyles = makeStyles({ }, }); -const DeleteFromBasketIcon = styled.img` +const DeleteFromBasketIcon = styled(CloseIcon)` width: 20px; cursor: pointer; - position:absolute; - left:235px; - top:5px; - :hover{ - color:red; + position: absolute; + left: 235px; + top: -10px; + &:hover { + fill: #d3d3d3; } `; @@ -94,7 +94,7 @@ export const CourseCard = ({ course }: CourseCardProps) => { return ( - deleteFromBasket(course.id)}> + deleteFromBasket(course.id)}> setSelected(!isSelected)}>{course.name} {course.groups.map((group, index) => (