@@ -8,22 +8,18 @@ import androidx.compose.foundation.layout.height
88import androidx.compose.foundation.layout.padding
99import androidx.compose.foundation.pager.HorizontalPager
1010import androidx.compose.foundation.pager.rememberPagerState
11- import androidx.compose.material3.Text
1211import androidx.compose.runtime.Composable
1312import androidx.compose.ui.Alignment
1413import androidx.compose.ui.Modifier
1514import androidx.compose.ui.res.stringResource
16- import androidx.compose.ui.text.style.TextAlign
1715import androidx.compose.ui.unit.dp
18- import com.ninecraft.booket.core.common.utils.HighlightedText
1916import com.ninecraft.booket.core.designsystem.DevicePreview
20- import com.ninecraft.booket.core.designsystem.component.ResourceImage
2117import com.ninecraft.booket.core.designsystem.component.button.ReedButton
2218import com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle
2319import com.ninecraft.booket.core.designsystem.component.button.largeButtonStyle
24- import com.ninecraft.booket.core.designsystem.theme.Black
2520import com.ninecraft.booket.core.designsystem.theme.ReedTheme
2621import com.ninecraft.booket.core.ui.component.ReedFullScreen
22+ import com.ninecraft.booket.feature.onboarding.component.OnboardingPage
2723import com.ninecraft.booket.feature.onboarding.component.PagerIndicator
2824import com.ninecraft.booket.feature.screens.OnboardingScreen
2925import com.slack.circuit.codegen.annotations.CircuitInject
@@ -46,96 +42,30 @@ internal fun OnboardingUi(
4642 ) { page ->
4743 when (page) {
4844 0 -> {
49- Column (
50- modifier = Modifier .fillMaxSize(),
51- horizontalAlignment = Alignment .CenterHorizontally ,
52- ) {
53- Spacer (modifier = Modifier .weight(1f ))
54- ResourceImage (
55- imageRes = R .drawable.img_onboarding_second_graphic,
56- contentDescription = " Onboarding First Graphic" ,
57- )
58- Text (
59- text = HighlightedText (
60- fullText = stringResource(R .string.onboarding_first_step_title),
61- highlightText = stringResource(R .string.onboarding_first_highlight_text),
62- highlightColor = ReedTheme .colors.bgPrimary,
63- ),
64- color = Black ,
65- textAlign = TextAlign .Center ,
66- style = ReedTheme .typography.heading1Bold,
67- )
68- Spacer (modifier = Modifier .height(ReedTheme .spacing.spacing3))
69- Text (
70- text = stringResource(R .string.onboarding_first_step_description),
71- color = ReedTheme .colors.contentTertiary,
72- textAlign = TextAlign .Center ,
73- style = ReedTheme .typography.body2Medium,
74- )
75- Spacer (modifier = Modifier .weight(1f ))
76- }
45+ OnboardingPage (
46+ imageRes = R .drawable.img_onboarding_second_graphic,
47+ titleRes = R .string.onboarding_first_page_title,
48+ highlightTextRes = R .string.onboarding_first_highlight_text,
49+ descriptionRes = R .string.onboarding_first_page_description,
50+ )
7751 }
7852
7953 1 -> {
80- Column (
81- modifier = Modifier .fillMaxSize(),
82- horizontalAlignment = Alignment .CenterHorizontally ,
83- ) {
84- Spacer (modifier = Modifier .weight(1f ))
85- ResourceImage (
86- imageRes = R .drawable.img_onboarding_second_graphic,
87- contentDescription = " Onboarding Second Graphic" ,
88- )
89- Text (
90- text = HighlightedText (
91- fullText = stringResource(R .string.onboarding_second_step_title),
92- highlightText = stringResource(R .string.onboarding_second_highlight_text),
93- highlightColor = ReedTheme .colors.bgPrimary,
94- ),
95- color = Black ,
96- textAlign = TextAlign .Center ,
97- style = ReedTheme .typography.heading1Bold,
98- )
99- Spacer (modifier = Modifier .height(ReedTheme .spacing.spacing3))
100- Text (
101- text = stringResource(R .string.onboarding_second_step_description),
102- color = ReedTheme .colors.contentTertiary,
103- textAlign = TextAlign .Center ,
104- style = ReedTheme .typography.body2Medium,
105- )
106- Spacer (modifier = Modifier .weight(1f , fill = false ))
107- }
54+ OnboardingPage (
55+ imageRes = R .drawable.img_onboarding_second_graphic,
56+ titleRes = R .string.onboarding_second_page_title,
57+ highlightTextRes = R .string.onboarding_second_highlight_text,
58+ descriptionRes = R .string.onboarding_second_page_description,
59+ )
10860 }
10961
11062 2 -> {
111- Column (
112- modifier = Modifier .fillMaxSize(),
113- horizontalAlignment = Alignment .CenterHorizontally ,
114- ) {
115- Spacer (modifier = Modifier .weight(1f ))
116- ResourceImage (
117- imageRes = R .drawable.img_onboarding_second_graphic,
118- contentDescription = " Onboarding Third Graphic" ,
119- )
120- Text (
121- text = HighlightedText (
122- fullText = stringResource(R .string.onboarding_third_step_title),
123- highlightText = stringResource(R .string.onboarding_third_highlight_text),
124- highlightColor = ReedTheme .colors.bgPrimary,
125- ),
126- color = Black ,
127- textAlign = TextAlign .Center ,
128- style = ReedTheme .typography.heading1Bold,
129- )
130- Spacer (modifier = Modifier .height(ReedTheme .spacing.spacing3))
131- Text (
132- text = stringResource(R .string.onboarding_third_step_description),
133- color = ReedTheme .colors.contentTertiary,
134- textAlign = TextAlign .Center ,
135- style = ReedTheme .typography.body2Medium,
136- )
137- Spacer (modifier = Modifier .weight(1f ))
138- }
63+ OnboardingPage (
64+ imageRes = R .drawable.img_onboarding_second_graphic,
65+ titleRes = R .string.onboarding_third_page_title,
66+ highlightTextRes = R .string.onboarding_third_highlight_text,
67+ descriptionRes = R .string.onboarding_third_page_description,
68+ )
13969 }
14070 }
14171 }
0 commit comments