-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,254 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 20 additions & 2 deletions
22
app/src/main/java/com/hackathon/alddeul_babsang/core_ui/component/AlddeulButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,49 @@ | ||
package com.hackathon.alddeul_babsang.core_ui.component | ||
|
||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Orange900 | ||
import com.hackathon.alddeul_babsang.core_ui.theme.White | ||
import com.hackathon.alddeul_babsang.core_ui.theme.title4Bold | ||
|
||
@Composable | ||
fun AlddeulButton( | ||
text: Int, | ||
textColor: Color = White, | ||
color: Color = Orange900, | ||
stroke: Color = Orange900, | ||
onClick: () -> Unit | ||
) { | ||
Button( | ||
modifier = Modifier | ||
.fillMaxWidth(), | ||
.fillMaxWidth() | ||
.clip(RoundedCornerShape(40.dp)), | ||
border = BorderStroke( | ||
width = 1.dp, | ||
color = stroke | ||
), | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = color | ||
), | ||
contentPadding = PaddingValues(vertical = 19.dp), | ||
onClick = { onClick() } | ||
) { | ||
Text( | ||
text = stringResource(id = text), | ||
style = title4Bold, | ||
color = White | ||
color = textColor | ||
) | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/com/hackathon/alddeul_babsang/core_ui/component/AlddeulHeader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.hackathon.alddeul_babsang.core_ui.component | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Gray900 | ||
import com.hackathon.alddeul_babsang.core_ui.theme.head7Semi | ||
|
||
@Composable | ||
fun AlddeulHeader( | ||
text: Int | ||
) { | ||
Text( | ||
modifier = Modifier.padding(top = 20.dp, bottom = 12.dp), | ||
text = stringResource(id = text), | ||
style = head7Semi, | ||
color = Gray900 | ||
) | ||
} |
60 changes: 60 additions & 0 deletions
60
app/src/main/java/com/hackathon/alddeul_babsang/core_ui/component/AuthTextField.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.hackathon.alddeul_babsang.core_ui.component | ||
|
||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextField | ||
import androidx.compose.material3.TextFieldDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Gray200 | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Orange900 | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Regular | ||
import com.hackathon.alddeul_babsang.core_ui.theme.body1Regular | ||
|
||
@Composable | ||
fun AuthTextField( | ||
modifier: Modifier = Modifier, | ||
value: String, | ||
onValueChange: (String) -> Unit, | ||
placeholderText: String, | ||
textAlign: TextAlign = TextAlign.Start | ||
) { | ||
TextField( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.padding(horizontal = 18.dp), | ||
value = value, | ||
onValueChange = onValueChange, | ||
placeholder = { | ||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
text = placeholderText, | ||
style = body1Regular, | ||
color = Gray200, | ||
textAlign = textAlign | ||
) | ||
}, | ||
textStyle = body1Regular.copy(textAlign = textAlign), | ||
colors = TextFieldDefaults.colors( | ||
focusedContainerColor = Color.Transparent, | ||
unfocusedContainerColor = Color.Transparent, | ||
focusedIndicatorColor = Orange900, | ||
unfocusedIndicatorColor = Regular | ||
) | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun AuthTextFieldPreview() { | ||
AuthTextField( | ||
value = "", | ||
onValueChange = {}, | ||
placeholderText = "아이디", | ||
) | ||
} |
49 changes: 49 additions & 0 deletions
49
app/src/main/java/com/hackathon/alddeul_babsang/core_ui/component/ReportTextField.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.hackathon.alddeul_babsang.core_ui.component | ||
|
||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextField | ||
import androidx.compose.material3.TextFieldDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.hackathon.alddeul_babsang.core_ui.theme.Gray200 | ||
import com.hackathon.alddeul_babsang.core_ui.theme.White | ||
import com.hackathon.alddeul_babsang.core_ui.theme.body1Regular | ||
|
||
@Composable | ||
fun ReportTextField( | ||
value: String, | ||
onValueChange: (String) -> Unit, | ||
placeholder: Int, | ||
) { | ||
TextField( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.border( | ||
width = 1.dp, | ||
color = Gray200, | ||
shape = RoundedCornerShape(10.dp) | ||
), | ||
value = value, | ||
onValueChange = onValueChange, | ||
placeholder = { | ||
Text( | ||
text = stringResource(id = placeholder), | ||
style = body1Regular, | ||
color = Gray200 | ||
) | ||
}, | ||
textStyle = body1Regular, | ||
colors = TextFieldDefaults.colors( | ||
focusedContainerColor = White, | ||
unfocusedContainerColor = White, | ||
focusedIndicatorColor = Color.Transparent, | ||
unfocusedIndicatorColor = Color.Transparent | ||
) | ||
) | ||
} |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/hackathon/alddeul_babsang/core_ui/component/ReportWriteArea.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.hackathon.alddeul_babsang.core_ui.component | ||
|
||
import androidx.compose.runtime.Composable | ||
|
||
@Composable | ||
fun ReportWriteArea( | ||
text: Int, | ||
value: String, | ||
onValueChange: (String) -> Unit, | ||
placeholder: Int | ||
) { | ||
AlddeulHeader(text = text) | ||
ReportTextField( | ||
value = value, | ||
onValueChange = onValueChange, | ||
placeholder = placeholder | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 0 additions & 97 deletions
97
app/src/main/java/com/hackathon/alddeul_babsang/presentation/auth/SignUpScreen1.kt
This file was deleted.
Oops, something went wrong.
Empty file.
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/hackathon/alddeul_babsang/presentation/auth/navigation/AuthNavGraph.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.hackathon.alddeul_babsang.presentation.auth.navigation | ||
|
||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.hackathon.alddeul_babsang.presentation.auth.screen.LoginRoute | ||
import com.hackathon.alddeul_babsang.presentation.auth.screen.SignUp1Route | ||
import com.hackathon.alddeul_babsang.presentation.auth.screen.SignUp2Route | ||
|
||
fun NavGraphBuilder.loginNavGraph( | ||
navigator: AuthNavigator | ||
) { | ||
composable(route = "login") { | ||
LoginRoute(navigator) | ||
} | ||
} | ||
|
||
fun NavGraphBuilder.signUp1NavGraph( | ||
navigator: AuthNavigator | ||
) { | ||
composable(route = "signUp1") { | ||
SignUp1Route(navigator) | ||
} | ||
} | ||
|
||
fun NavGraphBuilder.signUp2NavGraph( | ||
navigator: AuthNavigator | ||
) { | ||
composable(route = "signUp2") { | ||
SignUp2Route(navigator) | ||
} | ||
} |
Oops, something went wrong.