Skip to content

Commit 786903b

Browse files
committed
📝 :: JoinWaitingButton 플로팅 버튼으로 변경
1 parent 5bc3f97 commit 786903b

File tree

3 files changed

+27
-19
lines changed

3 files changed

+27
-19
lines changed

Diff for: core/design-system/src/main/res/drawable/join_waiting.xml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:width="60dp"
3-
android:height="60dp"
4-
android:viewportWidth="60"
5-
android:viewportHeight="60">
2+
android:width="26dp"
3+
android:height="24dp"
4+
android:viewportWidth="26"
5+
android:viewportHeight="24">
66
<path
7-
android:pathData="M30,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
8-
android:fillColor="#FFA927"/>
9-
<path
10-
android:pathData="M33.5,38.316C34.495,38.605 35.526,38.751 36.563,38.75C38.229,38.752 39.874,38.372 41.37,37.639C41.415,36.594 41.117,35.562 40.522,34.701C39.927,33.84 39.068,33.196 38.074,32.867C37.081,32.538 36.007,32.542 35.016,32.879C34.025,33.215 33.17,33.865 32.582,34.731M33.5,38.316V38.313C33.5,37.014 33.166,35.792 32.582,34.731M33.5,38.316V38.44C31.255,39.792 28.682,40.504 26.061,40.5C23.342,40.5 20.797,39.748 18.625,38.44L18.624,38.313C18.623,36.661 19.172,35.056 20.184,33.751C21.196,32.446 22.613,31.515 24.213,31.104C25.812,30.694 27.503,30.827 29.018,31.484C30.534,32.141 31.787,33.283 32.582,34.731M30,23.438C30,24.482 29.585,25.483 28.847,26.222C28.108,26.96 27.107,27.375 26.063,27.375C25.018,27.375 24.017,26.96 23.278,26.222C22.54,25.483 22.125,24.482 22.125,23.438C22.125,22.393 22.54,21.392 23.278,20.653C24.017,19.915 25.018,19.5 26.063,19.5C27.107,19.5 28.108,19.915 28.847,20.653C29.585,21.392 30,22.393 30,23.438ZM39.625,26.063C39.625,26.875 39.302,27.654 38.728,28.228C38.154,28.802 37.375,29.125 36.563,29.125C35.75,29.125 34.971,28.802 34.397,28.228C33.823,27.654 33.5,26.875 33.5,26.063C33.5,25.25 33.823,24.471 34.397,23.897C34.971,23.323 35.75,23 36.563,23C37.375,23 38.154,23.323 38.728,23.897C39.302,24.471 39.625,25.25 39.625,26.063Z"
7+
android:pathData="M16.5,20.316C17.495,20.605 18.526,20.751 19.563,20.75C21.229,20.752 22.874,20.372 24.37,19.639C24.415,18.594 24.117,17.562 23.522,16.701C22.927,15.84 22.068,15.196 21.074,14.867C20.08,14.538 19.007,14.542 18.016,14.879C17.025,15.215 16.17,15.865 15.582,16.731M16.5,20.316V20.313C16.5,19.014 16.166,17.792 15.582,16.731M16.5,20.316V20.44C14.255,21.792 11.682,22.504 9.061,22.5C6.342,22.5 3.797,21.747 1.625,20.44L1.624,20.313C1.623,18.661 2.172,17.056 3.184,15.751C4.196,14.446 5.613,13.515 7.213,13.104C8.812,12.694 10.503,12.828 12.018,13.484C13.534,14.141 14.787,15.283 15.582,16.731M13,5.438C13,6.482 12.585,7.483 11.847,8.222C11.108,8.96 10.107,9.375 9.063,9.375C8.018,9.375 7.017,8.96 6.278,8.222C5.54,7.483 5.125,6.482 5.125,5.438C5.125,4.393 5.54,3.392 6.278,2.653C7.017,1.915 8.018,1.5 9.063,1.5C10.107,1.5 11.108,1.915 11.847,2.653C12.585,3.392 13,4.393 13,5.438ZM22.625,8.063C22.625,8.875 22.302,9.654 21.728,10.228C21.154,10.802 20.375,11.125 19.563,11.125C18.75,11.125 17.971,10.802 17.397,10.228C16.823,9.654 16.5,8.875 16.5,8.063C16.5,7.25 16.823,6.471 17.397,5.897C17.971,5.323 18.75,5 19.563,5C20.375,5 21.154,5.323 21.728,5.897C22.302,6.471 22.625,7.25 22.625,8.063Z"
118
android:strokeLineJoin="round"
129
android:strokeWidth="1.5"
1310
android:fillColor="#00000000"

Diff for: feature/main/src/main/java/com/stackknowledge/main/MainPageScreen.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ private fun MainPageScreen(
107107
Authority.ROLE_STUDENT -> {}
108108
Authority.ROLE_TEACHER -> {
109109
JoinWaitingButton(
110-
modifier = modifier.padding(bottom = 96.dp, end = 8.dp),
111-
onClick = { openDialog = true }
110+
modifier = modifier.padding(bottom = 96.dp, end = 16.dp),
111+
onClick = { openDialog = true },
112112
)
113113
}
114114
}

Diff for: feature/main/src/main/java/com/stackknowledge/main/component/JoinWaitigButton.kt

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
11
package com.stackknowledge.main.component
22

33
import androidx.compose.foundation.Image
4+
import androidx.compose.foundation.background
45
import androidx.compose.foundation.clickable
56
import androidx.compose.foundation.layout.height
67
import androidx.compose.foundation.layout.width
8+
import androidx.compose.foundation.shape.CircleShape
9+
import androidx.compose.material3.FloatingActionButton
10+
import androidx.compose.material3.Icon
711
import androidx.compose.runtime.Composable
812
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.graphics.Color
914
import androidx.compose.ui.res.painterResource
1015
import androidx.compose.ui.tooling.preview.Preview
1116
import androidx.compose.ui.unit.dp
1217
import com.stackknowledge.design_system.R
18+
import com.stackknowledge.design_system.theme.StackKnowledgeAndroidTheme
1319

1420
@Composable
1521
fun JoinWaitingButton(
1622
modifier: Modifier = Modifier,
1723
onClick: () -> Unit,
1824
) {
19-
Image(
20-
painter = painterResource(R.drawable.join_waiting),
21-
contentDescription = "Join Waiting Button",
22-
modifier = modifier
23-
.width(60.dp)
24-
.height(60.dp)
25-
.clickable(onClick = onClick)
26-
)
27-
25+
StackKnowledgeAndroidTheme { colors, _ ->
26+
FloatingActionButton(
27+
modifier = modifier,
28+
onClick = onClick,
29+
shape = CircleShape,
30+
containerColor = colors.P1,
31+
) {
32+
Icon(
33+
painter = painterResource(id = R.drawable.join_waiting),
34+
contentDescription = "Join Waiting Button",
35+
tint = Color.Unspecified
36+
)
37+
}
38+
}
2839
}
2940

3041
@Preview

0 commit comments

Comments
 (0)