Skip to content

Commit

Permalink
🔧 fix: 애니메이션 수정 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhz committed Sep 26, 2024
1 parent 8dbc150 commit d62447d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal fun NavGraphBuilder.classroomScreen(
modifier: Modifier = Modifier
) {
composable<Classroom> {
ClassroomScreen()
ClassroomScreen(modifier)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
package com.afs.tutrd.presentation.classroom.view

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.afs.tutrd.component.scaffold.TutrdScaffold

@Composable
fun ClassroomScreen() {
fun ClassroomScreen(
modifier: Modifier = Modifier,
) {
val scrollState = rememberScrollState()
TutrdScaffold(
topBar = { ClassroomTopBar(title = "과목 관리") { } }
topBar = {
ClassroomTopBar(
title = "과목 관리"
) { }
}
) { paddingValues ->
LazyColumn(
modifier = Modifier.padding(paddingValues).padding(horizontal = 20.dp).fillMaxWidth(),
Column(
modifier = modifier
.verticalScroll(scrollState)
.padding(paddingValues)
.padding(20.dp)
.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(20.dp),
contentPadding = PaddingValues(vertical = 20.dp)
) {
items(3) {
repeat(10) {
ClassroomCard { }
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.afs.tutrd.presentation.classroom.view

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
Expand All @@ -12,14 +13,17 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.afs.tutrd.theme.Heading1
import com.afs.tutrd.theme.TutrdBackground

@Composable
internal fun ClassroomTopBar(
modifier: Modifier = Modifier,
title: String,
onClickTitle: () -> Unit
) {
Box(
modifier = Modifier
modifier = modifier
.background(TutrdBackground)
.height(56.dp)
.fillMaxWidth()
.padding(horizontal = 20.dp)
Expand All @@ -39,7 +43,7 @@ internal fun ClassroomTopBar(
}
@Preview(showBackground = true)
@Composable
private fun previewHomeTopBar() {
private fun PreviewHomeTopBar() {
ClassroomTopBar(title = "과목 관리") {

}
Expand Down

0 comments on commit d62447d

Please sign in to comment.