Skip to content

Commit

Permalink
feat: add AddScreen Action Button
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Jan 31, 2025
1 parent d144768 commit cfa6d36
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ package com.chipichipi.dobedobe.feature.goal
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand All @@ -18,6 +22,7 @@ import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.flowWithLifecycle
import com.chipichipi.dobedobe.core.designsystem.component.DobeDobeBackground
import com.chipichipi.dobedobe.core.designsystem.component.DobeDobeTextButton
import com.chipichipi.dobedobe.core.designsystem.theme.DobeDobeTheme
import com.chipichipi.dobedobe.feature.goal.component.AddGoalTopAppBar
import com.chipichipi.dobedobe.feature.goal.component.GoalEditor
Expand Down Expand Up @@ -60,7 +65,8 @@ fun AddGoalRoute(
detectTapGestures {
focusManager.clearFocus()
}
},
}
.imePadding(),
errorMessage = errorMessage,
onShowSnackbar = onShowSnackbar,
navigateToBack = onBack,
Expand Down Expand Up @@ -92,13 +98,26 @@ private fun AddGoalScreen(
.background(DobeDobeTheme.colors.white)
.padding(innerPadding)
.padding(horizontal = 24.dp)
.padding(top = 24.dp),
.padding(top = 24.dp, bottom = 32.dp),
title = "",
header = stringResource(id = R.string.feature_detail_goal_todo_editor_header),
errorMessage = errorMessage,
onChangeTitle = onChangeGoalName,
onDone = onAddGoal,
)
) {
DobeDobeTextButton(
modifier = Modifier
.fillMaxWidth()
.heightIn(54.dp),
onClick = onAddGoal,
) {
Text(
text = stringResource(R.string.feature_add_goal_action_button),
style = DobeDobeTheme.typography.heading2,
color = DobeDobeTheme.colors.white,
)
}
}
}
}

Expand Down
1 change: 1 addition & 0 deletions feature/goal/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<string name="feature_goal_title_error_message_too_long">You can only write 20 characters including spaces</string>

<string name="feature_goal_navigate_back_icon_content_description">navigate back</string>
<string name="feature_add_goal_action_button">완료</string>
</resources>
1 change: 1 addition & 0 deletions feature/goal/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
<string name="feature_goal_title_error_message_too_long">띄어쓰기 포함 20자까지만 쓸 수 있어요</string>

<string name="feature_goal_navigate_back_icon_content_description">뒤로 가기</string>
<string name="feature_add_goal_action_button">완료</string>

</resources>

0 comments on commit cfa6d36

Please sign in to comment.