-
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
9 changed files
with
560 additions
and
206 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
96 changes: 96 additions & 0 deletions
96
feature/sent/src/main/java/com/susu/feature/envelopeadd/content/EventContent.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,96 @@ | ||
package com.susu.feature.envelopeadd.content | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.susu.core.designsystem.component.button.FilledButtonColor | ||
import com.susu.core.designsystem.component.button.GhostButtonColor | ||
import com.susu.core.designsystem.component.button.MediumButtonStyle | ||
import com.susu.core.designsystem.component.button.SusuFilledButton | ||
import com.susu.core.designsystem.component.button.SusuGhostButton | ||
import com.susu.core.designsystem.theme.Gray100 | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
import com.susu.feature.sent.R | ||
|
||
@Composable | ||
fun EventContent( | ||
modifier: Modifier = Modifier, | ||
padding: PaddingValues = PaddingValues( | ||
horizontal = SusuTheme.spacing.spacing_m, | ||
vertical = SusuTheme.spacing.spacing_xl, | ||
), | ||
eventList: List<String>, | ||
) { | ||
val scrollState = rememberScrollState() | ||
var selectedItem by remember { mutableStateOf(-1) } | ||
|
||
Column( | ||
modifier = modifier | ||
.fillMaxSize() | ||
.padding(padding) | ||
.verticalScroll(scrollState), | ||
) { | ||
Text( | ||
text = stringResource(id = R.string.sent_envelope_add_relationship_title), | ||
style = SusuTheme.typography.title_m, | ||
color = Gray100, | ||
) | ||
Spacer( | ||
modifier = modifier | ||
.size(SusuTheme.spacing.spacing_xxl), | ||
) | ||
Column( | ||
verticalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs), | ||
) { | ||
eventList.forEachIndexed { index, event -> | ||
if (selectedItem == index) { | ||
SusuFilledButton( | ||
color = FilledButtonColor.Orange, | ||
style = MediumButtonStyle.height60, | ||
text = event, | ||
onClick = { | ||
selectedItem = index | ||
}, | ||
modifier = modifier.fillMaxWidth(), | ||
) | ||
} else { | ||
SusuGhostButton( | ||
color = GhostButtonColor.Black, | ||
style = MediumButtonStyle.height60, | ||
text = event, | ||
onClick = { | ||
selectedItem = index | ||
}, | ||
modifier = modifier.fillMaxWidth(), | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview(showBackground = true, backgroundColor = 0xFFF6F6F6) | ||
@Composable | ||
fun EventContentPreview() { | ||
val eventList = mutableListOf("결혼식", "돌잔치", "장례식", "생일 기념일", "직접 입력") | ||
|
||
SusuTheme { | ||
EventContent(eventList = eventList) | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
feature/sent/src/main/java/com/susu/feature/envelopeadd/content/MemoContent.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,66 @@ | ||
package com.susu.feature.envelopeadd.content | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.susu.core.designsystem.component.textfield.SusuBasicTextField | ||
import com.susu.core.designsystem.theme.Gray100 | ||
import com.susu.core.designsystem.theme.Gray40 | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
import com.susu.feature.sent.R | ||
|
||
@Composable | ||
fun MemoContent( | ||
modifier: Modifier = Modifier, | ||
padding: PaddingValues = PaddingValues( | ||
horizontal = SusuTheme.spacing.spacing_m, | ||
vertical = SusuTheme.spacing.spacing_xl, | ||
), | ||
) { | ||
var memo by remember { mutableStateOf("") } | ||
|
||
Column( | ||
modifier = modifier | ||
.fillMaxSize() | ||
.padding(padding), | ||
) { | ||
Text( | ||
text = stringResource(id = R.string.sent_envelope_add_memo_title), | ||
style = SusuTheme.typography.title_m, | ||
color = Gray100, | ||
) | ||
Spacer( | ||
modifier = modifier | ||
.size(SusuTheme.spacing.spacing_m), | ||
) | ||
SusuBasicTextField( | ||
text = memo, | ||
onTextChange = { memo = it }, | ||
placeholder = stringResource(id = R.string.sent_envelope_add_memo_placeholder), | ||
placeholderColor = Gray40, | ||
modifier = modifier.fillMaxWidth(), | ||
) | ||
Spacer(modifier = modifier.size(SusuTheme.spacing.spacing_xl)) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true, backgroundColor = 0xFFF6F6F6) | ||
@Composable | ||
fun MemoContentPreview() { | ||
SusuTheme { | ||
MemoContent() | ||
} | ||
} |
106 changes: 106 additions & 0 deletions
106
feature/sent/src/main/java/com/susu/feature/envelopeadd/content/MoreContent.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,106 @@ | ||
package com.susu.feature.envelopeadd.content | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.susu.core.designsystem.component.button.FilledButtonColor | ||
import com.susu.core.designsystem.component.button.GhostButtonColor | ||
import com.susu.core.designsystem.component.button.MediumButtonStyle | ||
import com.susu.core.designsystem.component.button.SusuFilledButton | ||
import com.susu.core.designsystem.component.button.SusuGhostButton | ||
import com.susu.core.designsystem.theme.Gray100 | ||
import com.susu.core.designsystem.theme.Gray70 | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
import com.susu.feature.sent.R | ||
|
||
@Composable | ||
fun MoreContent( | ||
modifier: Modifier = Modifier, | ||
padding: PaddingValues = PaddingValues( | ||
horizontal = SusuTheme.spacing.spacing_m, | ||
vertical = SusuTheme.spacing.spacing_xl, | ||
), | ||
moreList: List<String>, | ||
) { | ||
val scrollState = rememberScrollState() | ||
var selectedItem by remember { mutableStateOf(-1) } | ||
|
||
Column( | ||
modifier = modifier | ||
.fillMaxSize() | ||
.padding(padding) | ||
.verticalScroll(scrollState), | ||
) { | ||
Text( | ||
text = stringResource(id = R.string.sent_envelope_add_more_title), | ||
style = SusuTheme.typography.title_m, | ||
color = Gray100, | ||
) | ||
Spacer( | ||
modifier = modifier | ||
.size(SusuTheme.spacing.spacing_xxxxs), | ||
) | ||
Text( | ||
text = stringResource(id = R.string.sent_envelope_add_more_subtitle), | ||
style = SusuTheme.typography.text_xs, | ||
color = Gray70, | ||
) | ||
Spacer( | ||
modifier = modifier | ||
.size(SusuTheme.spacing.spacing_xxl), | ||
) | ||
Column( | ||
verticalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs), | ||
) { | ||
moreList.forEachIndexed { index, category -> | ||
if (selectedItem == index) { | ||
SusuFilledButton( | ||
color = FilledButtonColor.Orange, | ||
style = MediumButtonStyle.height60, | ||
text = category, | ||
onClick = { | ||
selectedItem = index | ||
}, | ||
modifier = modifier.fillMaxWidth(), | ||
) | ||
} else { | ||
SusuGhostButton( | ||
color = GhostButtonColor.Black, | ||
style = MediumButtonStyle.height60, | ||
text = category, | ||
onClick = { | ||
selectedItem = index | ||
}, | ||
modifier = modifier.fillMaxWidth(), | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview(showBackground = true, backgroundColor = 0xFFF6F6F6) | ||
@Composable | ||
fun MoreContentPreview() { | ||
val moreList = mutableListOf("방문여부", "선물", "메모", "받은 이의 연락처") | ||
|
||
SusuTheme { | ||
MoreContent(moreList = moreList) | ||
} | ||
} |
Oops, something went wrong.