@@ -84,47 +84,48 @@ const NovelThumbnail = ({
84
84
} : NovelThumbnailProps ) => {
85
85
const [ expanded , setExpanded ] = useState ( false ) ;
86
86
87
- if ( ! expanded ) {
88
- return (
89
- < TouchableWithoutFeedback onPress = { ( ) => setExpanded ( ! expanded ) } >
87
+ return (
88
+ < TouchableWithoutFeedback
89
+ onPress = { ( ) => setExpanded ( ! expanded ) }
90
+ style = { styles . novelThumbnailContainer }
91
+ >
92
+ { ! expanded ? (
90
93
< Image source = { source } style = { styles . novelThumbnail } />
91
- </ TouchableWithoutFeedback >
92
- ) ;
93
- } else {
94
- return (
95
- < Portal >
96
- < IconButton
97
- icon = "pencil-outline"
98
- style = { {
99
- position : 'absolute' ,
100
- top : StatusBar . currentHeight ?? 0 + 10 ,
101
- right : 10 ,
102
- zIndex : 10 ,
103
- } }
104
- iconColor = { theme . onBackground }
105
- onPress = { setCustomNovelCover }
106
- />
107
- < Pressable
108
- style = { {
109
- position : 'absolute' ,
110
- width : Dimensions . get ( 'window' ) . width ,
111
- height : Dimensions . get ( 'window' ) . height + 60 ,
112
- justifyContent : 'center' ,
113
- backgroundColor : 'rgba(0,0,0,0.7)' ,
114
- } }
115
- onPress = { ( ) => setExpanded ( false ) }
116
- >
117
- < Image
118
- source = { source }
94
+ ) : (
95
+ < Portal >
96
+ < IconButton
97
+ icon = "pencil-outline"
119
98
style = { {
120
- width : Dimensions . get ( 'window' ) . width ,
121
- height : ( Dimensions . get ( 'window' ) . width * 3 ) / 2 ,
99
+ position : 'absolute' ,
100
+ top : StatusBar . currentHeight ?? 0 + 10 ,
101
+ right : 10 ,
102
+ zIndex : 10 ,
122
103
} }
104
+ iconColor = { theme . onBackground }
105
+ onPress = { setCustomNovelCover }
123
106
/>
124
- </ Pressable >
125
- </ Portal >
126
- ) ;
127
- }
107
+ < Pressable
108
+ style = { {
109
+ position : 'absolute' ,
110
+ width : Dimensions . get ( 'window' ) . width ,
111
+ height : Dimensions . get ( 'window' ) . height + 60 ,
112
+ justifyContent : 'center' ,
113
+ backgroundColor : 'rgba(0,0,0,0.7)' ,
114
+ } }
115
+ onPress = { ( ) => setExpanded ( false ) }
116
+ >
117
+ < Image
118
+ source = { source }
119
+ style = { {
120
+ width : Dimensions . get ( 'window' ) . width ,
121
+ height : ( Dimensions . get ( 'window' ) . width * 3 ) / 2 ,
122
+ } }
123
+ />
124
+ </ Pressable >
125
+ </ Portal >
126
+ ) }
127
+ </ TouchableWithoutFeedback >
128
+ ) ;
128
129
} ;
129
130
130
131
const NovelTitle = ( {
@@ -286,10 +287,14 @@ const styles = StyleSheet.create({
286
287
linearGradient : {
287
288
flex : 1 ,
288
289
} ,
289
- novelThumbnail : {
290
+ novelThumbnailContainer : {
290
291
height : 150 ,
291
292
width : 100 ,
292
293
marginHorizontal : 4 ,
294
+ } ,
295
+ novelThumbnail : {
296
+ height : 150 ,
297
+ width : 100 ,
293
298
borderRadius : 6 ,
294
299
backgroundColor : coverPlaceholderColor ,
295
300
} ,
0 commit comments