File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
apps/pyconkr/src/components/layout/CartBadgeButton Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,23 @@ type InnerCartBadgeButtonPropType = {
1010 count ?: number ;
1111} ;
1212
13+ const ColoredIconButton = styled ( IconButton ) ( ( { theme } ) => ( {
14+ color : theme . palette . primary . nonFocus ,
15+ "&:hover" : { color : theme . palette . primary . dark } ,
16+ "&:active" : { color : theme . palette . primary . main } ,
17+ transition : "color 0.4s ease, background-color 0.4s ease" ,
18+ } ) ) ;
19+
1320const InnerCartBadge = styled ( Badge ) ( { [ `& .${ badgeClasses . badge } ` ] : { top : "-12px" , right : "-3px" } } ) ;
1421
1522const InnerCartBadgeButton : React . FC < InnerCartBadgeButtonPropType > = ( { loading, count } ) => {
1623 const navigate = useNavigate ( ) ;
1724
1825 return (
19- < IconButton loading = { loading } onClick = { ( ) => navigate ( "/store/cart" ) } >
26+ < ColoredIconButton loading = { loading } onClick = { ( ) => navigate ( "/store/cart" ) } >
2027 < ShoppingCart />
2128 { count !== undefined && count > 0 && < InnerCartBadge badgeContent = { count } color = "primary" overlap = "circular" /> }
22- </ IconButton >
29+ </ ColoredIconButton >
2330 ) ;
2431} ;
2532
You can’t perform that action at this time.
0 commit comments