@@ -16,6 +16,7 @@ import React, { useEffect } from 'react';
16
16
import { useTranslation } from 'react-i18next' ;
17
17
import { mutate } from 'swr' ;
18
18
import { t as translate } from 'i18next' ;
19
+ import Button from '@mui/material/Button' ;
19
20
import { IManga , ISource } from '@/typings' ;
20
21
import requestManager from '@/lib/RequestManager' ;
21
22
import makeToast from '@/components/util/Toast' ;
@@ -69,11 +70,19 @@ const Metadata = styled('div')(({ theme }) => ({
69
70
} ) ) ;
70
71
const MangaButtonsContainer = styled ( 'div' , { shouldForwardProp : ( prop ) => prop !== 'inLibrary' } ) < {
71
72
inLibrary : boolean ;
72
- } > ( ( { inLibrary } ) => ( {
73
+ } > ( ( { theme , inLibrary } ) => ( {
73
74
display : 'flex' ,
74
75
justifyContent : 'space-around' ,
75
76
'& button' : {
76
77
color : inLibrary ? '#2196f3' : 'inherit' ,
78
+ borderRadius : '25px' ,
79
+ textTransform : 'none' ,
80
+ paddingLeft : '20px' ,
81
+ paddingRight : '20px' ,
82
+ fontSize : 'x-large' ,
83
+ [ theme . breakpoints . down ( 'sm' ) ] : {
84
+ fontSize : 'larger' ,
85
+ } ,
77
86
} ,
78
87
'& a' : {
79
88
textDecoration : 'none' ,
@@ -176,20 +185,18 @@ const MangaDetails: React.FC<IProps> = ({ manga }) => {
176
185
</ ThumbnailMetadataWrapper >
177
186
< MangaButtonsContainer inLibrary = { manga . inLibrary } >
178
187
< div >
179
- < IconButton onClick = { manga . inLibrary ? removeFromLibrary : addToLibrary } size = "large" >
180
- { manga . inLibrary ? < FavoriteIcon sx = { { mr : 1 } } /> : < FavoriteBorderIcon sx = { { mr : 1 } } /> }
181
- < Typography sx = { { fontSize : { xs : '0.75em' , sm : '0.85em' } } } >
182
- { manga . inLibrary ? t ( 'manga.button.in_library' ) : t ( 'manga.button.add_to_library' ) }
183
- </ Typography >
184
- </ IconButton >
188
+ < Button
189
+ startIcon = { manga . inLibrary ? < FavoriteIcon /> : < FavoriteBorderIcon /> }
190
+ onClick = { manga . inLibrary ? removeFromLibrary : addToLibrary }
191
+ size = "large"
192
+ >
193
+ { manga . inLibrary ? t ( 'manga.button.in_library' ) : t ( 'manga.button.add_to_library' ) }
194
+ </ Button >
185
195
</ div >
186
196
< a href = { manga . realUrl } target = "_blank" rel = "noreferrer" >
187
- < IconButton size = "large" >
188
- < PublicIcon sx = { { mr : 1 } } />
189
- < Typography sx = { { fontSize : { xs : '0.75em' , sm : '0.85em' } } } >
190
- { t ( 'global.button.open_site' ) }
191
- </ Typography >
192
- </ IconButton >
197
+ < Button startIcon = { < PublicIcon /> } size = "large" >
198
+ { t ( 'global.button.open_site' ) }
199
+ </ Button >
193
200
</ a >
194
201
</ MangaButtonsContainer >
195
202
</ TopContentWrapper >
0 commit comments