-
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
8 changed files
with
228 additions
and
2 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...signsystem/src/main/java/com/susu/core/designsystem/component/appbar/icon/RegisterText.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,33 @@ | ||
package com.susu.core.designsystem.component.appbar.icon | ||
|
||
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.tooling.preview.Preview | ||
import com.susu.core.designsystem.R | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
import com.susu.core.ui.extension.susuClickable | ||
|
||
@Composable | ||
fun RegisterText( | ||
modifier: Modifier = Modifier, | ||
onClick: () -> Unit = {}, | ||
) { | ||
Text( | ||
modifier = modifier.susuClickable( | ||
rippleEnabled = false, | ||
onClick = onClick, | ||
), | ||
text = stringResource(com.susu.core.ui.R.string.word_register), | ||
style = SusuTheme.typography.title_xxs, | ||
) | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun RegisterTextPreview() { | ||
SusuTheme { | ||
RegisterText() | ||
} | ||
} |
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
136 changes: 136 additions & 0 deletions
136
feature/community/src/main/java/com/susu/feature/community/voteadd/VoteAddScreen.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,136 @@ | ||
package com.susu.feature.community.voteadd | ||
|
||
import androidx.compose.foundation.Image | ||
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.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.imePadding | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.foundation.text.BasicTextField | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.susu.core.designsystem.component.appbar.SusuDefaultAppBar | ||
import com.susu.core.designsystem.component.appbar.icon.BackIcon | ||
import com.susu.core.designsystem.component.appbar.icon.DeleteText | ||
import com.susu.core.designsystem.component.appbar.icon.EditText | ||
import com.susu.core.designsystem.component.appbar.icon.RegisterText | ||
import com.susu.core.designsystem.component.button.FilledButtonColor | ||
import com.susu.core.designsystem.component.button.SusuFilledButton | ||
import com.susu.core.designsystem.component.button.XSmallButtonStyle | ||
import com.susu.core.designsystem.component.textfield.SusuBasicTextField | ||
import com.susu.core.designsystem.component.textfieldbutton.SusuTextFieldFillMaxButton | ||
import com.susu.core.designsystem.component.textfieldbutton.TextFieldButtonColor | ||
import com.susu.core.designsystem.component.textfieldbutton.style.MediumTextFieldButtonStyle | ||
import com.susu.core.designsystem.component.textfieldbutton.style.TextFieldButtonStyle | ||
import com.susu.core.designsystem.theme.Gray10 | ||
import com.susu.core.designsystem.theme.Orange60 | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
import com.susu.feature.community.R | ||
|
||
@Composable | ||
fun VoteAddRoute() { | ||
VoteAddScreen() | ||
} | ||
|
||
@Composable | ||
fun VoteAddScreen( | ||
onClickBack: () -> Unit = {}, | ||
) { | ||
Column( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.background(SusuTheme.colorScheme.background10), | ||
) { | ||
SusuDefaultAppBar( | ||
leftIcon = { | ||
BackIcon( | ||
onClick = onClickBack, | ||
) | ||
}, | ||
title = stringResource(R.string.vote_add_screen_title), | ||
actions = { | ||
RegisterText( | ||
modifier = Modifier.padding(end = SusuTheme.spacing.spacing_m), | ||
) | ||
}, | ||
) | ||
|
||
Column( | ||
modifier = Modifier | ||
.padding(SusuTheme.spacing.spacing_m) | ||
.weight(1f, fill = false) | ||
.verticalScroll(rememberScrollState()), | ||
) { | ||
Row( | ||
horizontalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxxxs) | ||
) { | ||
listOf("결혼식", "장례식", "돌잔치", "생일 기념일", "자유").forEach { | ||
SusuFilledButton( | ||
color = FilledButtonColor.Black, | ||
style = XSmallButtonStyle.height28, | ||
text = it, | ||
) | ||
} | ||
} | ||
|
||
Spacer(modifier = Modifier.size(SusuTheme.spacing.spacing_m)) | ||
|
||
SusuBasicTextField( | ||
text = "", | ||
textStyle = SusuTheme.typography.text_xxs, | ||
maxLines = 10, | ||
placeholder = stringResource(R.string.vote_add_screen_textfield_placeholder), | ||
) | ||
|
||
Spacer(modifier = Modifier.size(SusuTheme.spacing.spacing_xl)) | ||
|
||
Column( | ||
verticalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs) | ||
) { | ||
repeat(5) { | ||
SusuTextFieldFillMaxButton( | ||
style = MediumTextFieldButtonStyle.height52, | ||
color = TextFieldButtonColor.Gray, | ||
placeholder = stringResource(R.string.vote_add_screen_textfield_button_placeholder), | ||
) | ||
} | ||
} | ||
} | ||
|
||
Icon( | ||
modifier = Modifier | ||
.imePadding() | ||
.clip(CircleShape) | ||
.background(Orange60) | ||
.padding(SusuTheme.spacing.spacing_xxxxs) | ||
.align(Alignment.CenterHorizontally), | ||
painter = painterResource(id = com.susu.core.designsystem.R.drawable.ic_floating_button_add), | ||
contentDescription = stringResource(R.string.vote_add_screen_content_description_vote_add_button), | ||
tint = Gray10, | ||
) | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun VoteAddScreenPreview() { | ||
SusuTheme { | ||
VoteAddScreen() | ||
} | ||
} |
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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="vote_add_screen_title">새 투표 작성</string> | ||
<string name="vote_add_screen_textfield_placeholder">투표 내용을 작성해주세요</string> | ||
<string name="vote_add_screen_textfield_button_placeholder">선택지를 입력하세요</string> | ||
<string name="vote_add_screen_content_description_vote_add_button">투표 추가 버튼</string> | ||
</resources> |
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