Skip to content

Commit

Permalink
Merge remote-tracking branch 'main/dev' into feature/firebase
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/src/main/java/com/afs/tutrd/di/RepositoryModule.kt
#	app/src/main/java/com/afs/tutrd/presentation/classroom/ClassroomScreen.kt
#	app/src/main/java/com/afs/tutrd/presentation/classroom/contract/ClassroomIntent.kt
#	app/src/main/java/com/afs/tutrd/presentation/classroom/contract/ClassroomSideEffect.kt
#	app/src/main/java/com/afs/tutrd/presentation/classroom/contract/ClassroomState.kt
  • Loading branch information
easyhz committed Aug 15, 2024
2 parents 7095366 + 8089167 commit fdc5d4b
Show file tree
Hide file tree
Showing 20 changed files with 944 additions and 47 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/com/afs/tutrd/TutrdApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ fun TutrdApp() {
val tutrdNavController = rememberTutrdNavController()
val navController = tutrdNavController.navController
val isVisibleBottomBar = tutrdNavController.isInBottomTabs()

val currentTab = tutrdNavController.mapRouteToTab()

TutrdScaffold(
Expand Down
51 changes: 51 additions & 0 deletions app/src/main/java/com/afs/tutrd/component/colordot/ColorDot.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package com.afs.tutrd.component.colordot

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

sealed class DotSize {
data object Big : DotSize()
data object Small : DotSize()
}


@Composable
fun ColorDot(
color: Color,
size: DotSize
) {
Icon(
imageVector = Icons.Filled.Check,
contentDescription = "eventDot",
modifier = Modifier
.size(if (size == DotSize.Small) 8.dp else 14.dp)
.background(color, shape = CircleShape),
tint = color
)
}

@Preview
@Composable
fun preview() {
Row() {
ColorDot(
Color.Red,
DotSize.Big
)
ColorDot(
Color.Green,
DotSize.Small
)
}
}
45 changes: 45 additions & 0 deletions app/src/main/java/com/afs/tutrd/component/divider/Divider.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.afs.tutrd.component.divider

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
fun Divider(
title: String?
) {
Column(
modifier = Modifier,
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
if (title != null) {
Text(
fontWeight = FontWeight.Bold,
fontSize = 18.sp,
text = title,
)
}
Box(
modifier = Modifier
.fillMaxWidth()
.height(1.dp)
.background(color = Color(213, 213, 213)))
}
}

@Preview
@Composable
fun preview() {
Divider(title = "정보")
}
Loading

0 comments on commit fdc5d4b

Please sign in to comment.