버튼의 경우 3가지 타입이 있다 - default , hover, active
styled 컴포넌트 active 일경우 처리 방식
background-image: url('/images/icons/icon_star.png');
${(props) =>
props.active
? css`
background-image: url('/images/icons/icon_star_active.png');
`
: css`
&:hover {
background-image: url('/images/icons/icon_star_hover.png');
}
`}
<ProJectStarButton type="button" active></ProJectStarButton>
/*
props 에 active 가 있을 경우, 삼항 연산자로 해서 덮는 방식이다
이렇게 하면 active 일때 hover 기능이 안된다.
*/