1- package com.ninecraft.booket.feature.search .component
1+ package com.ninecraft.booket.core.ui .component
22
33import android.annotation.SuppressLint
4+ import androidx.compose.foundation.background
45import androidx.compose.foundation.gestures.FlingBehavior
56import androidx.compose.foundation.gestures.ScrollableDefaults
67import androidx.compose.foundation.layout.Arrangement
8+ import androidx.compose.foundation.layout.Box
79import androidx.compose.foundation.layout.Column
810import androidx.compose.foundation.layout.PaddingValues
11+ import androidx.compose.foundation.layout.Row
12+ import androidx.compose.foundation.layout.Spacer
13+ import androidx.compose.foundation.layout.fillMaxWidth
14+ import androidx.compose.foundation.layout.height
915import androidx.compose.foundation.layout.padding
16+ import androidx.compose.foundation.layout.width
1017import androidx.compose.foundation.lazy.LazyColumn
1118import androidx.compose.foundation.lazy.LazyListScope
1219import androidx.compose.foundation.lazy.LazyListState
1320import androidx.compose.foundation.lazy.items
1421import androidx.compose.foundation.lazy.rememberLazyListState
22+ import androidx.compose.foundation.shape.RoundedCornerShape
1523import androidx.compose.material3.Surface
1624import androidx.compose.material3.Text
1725import androidx.compose.runtime.Composable
@@ -27,13 +35,12 @@ import androidx.compose.ui.Modifier
2735import androidx.compose.ui.tooling.preview.Preview
2836import androidx.compose.ui.unit.dp
2937import com.ninecraft.booket.core.designsystem.theme.ReedTheme
30- import com.ninecraft.booket.core.model.BookSummaryModel
3138
3239// 기기에서 평균적으로 한 화면에 보이는 아이템 개수
3340private const val LIMIT_COUNT = 6
3441
3542@Composable
36- internal fun InfinityLazyColumn (
43+ fun InfinityLazyColumn (
3744 modifier : Modifier = Modifier ,
3845 state : LazyListState = rememberLazyListState(),
3946 contentPadding : PaddingValues = PaddingValues (0.dp),
@@ -117,16 +124,39 @@ private fun InfinityLazyColumnPreview() {
117124 verticalArrangement = Arrangement .spacedBy(8 .dp),
118125 content = {
119126 items(contents, key = { it }) {
120- BookItem (
121- book = BookSummaryModel (
122- title = " 여름은 오래 그곳에 남아" ,
123- author = " 마쓰이에 마사시" ,
124- publisher = " 비채" ,
125- coverImageUrl = " https://example.com/sample-book-cover.jpg" ,
126- isbn = " 978-89-7337-932-5" ,
127- ),
128- onBookClick = {},
129- )
127+ Row (
128+ modifier = Modifier
129+ .fillMaxWidth()
130+ .padding(
131+ horizontal = ReedTheme .spacing.spacing5,
132+ vertical = ReedTheme .spacing.spacing4,
133+ ),
134+ verticalAlignment = Alignment .CenterVertically ,
135+ ) {
136+ Box (
137+ modifier = Modifier
138+ .width(68 .dp)
139+ .height(100 .dp)
140+ .background(
141+ color = ReedTheme .colors.contentTertiary,
142+ shape = RoundedCornerShape (ReedTheme .radius.sm),
143+ ),
144+ )
145+ Spacer (Modifier .width(ReedTheme .spacing.spacing4))
146+ Column {
147+ Text (
148+ text = " Title" ,
149+ color = ReedTheme .colors.contentPrimary,
150+ style = ReedTheme .typography.body1SemiBold,
151+ )
152+ Spacer (Modifier .height(ReedTheme .spacing.spacing1))
153+ Text (
154+ text = " Description" ,
155+ color = ReedTheme .colors.contentTertiary,
156+ style = ReedTheme .typography.label1Medium,
157+ )
158+ }
159+ }
130160 }
131161 },
132162 )
0 commit comments