Updated on 2026-08-14
This commit is contained in:
parent
cd3d290eb1
commit
f3afa55469
9 changed files with 72 additions and 26 deletions
|
|
@ -1,5 +1,4 @@
|
|||
plugins {
|
||||
alias(deps.plugins.android.library)
|
||||
alias(deps.plugins.kotlin.android)
|
||||
alias(deps.plugins.kotlin.jvm)
|
||||
id("configuration")
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.features.learn2earn.api" />
|
||||
|
|
@ -34,6 +34,7 @@ dependencies {
|
|||
implementation(project(":core:res"))
|
||||
|
||||
/** Tangem libraries */
|
||||
// TODO: fixme: delete if later it doesn't needed
|
||||
// implementation(deps.tangem.card.core)
|
||||
// implementation(deps.tangem.card.android) {
|
||||
// exclude(module = "joda-time")
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import androidx.compose.ui.graphics.ColorFilter
|
|||
import androidx.compose.ui.graphics.Shape
|
||||
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.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.core.ui.res.TangemTypography
|
||||
|
|
@ -103,4 +104,28 @@ private fun ContentBackground(shape: Shape) {
|
|||
)
|
||||
.fillMaxSize(),
|
||||
)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun OneInchStoriesContentPreview_Light() {
|
||||
TangemTheme(
|
||||
isDark = false,
|
||||
) {
|
||||
GetBonusAlert(
|
||||
onClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun OneInchStoriesContentPreview_Dark() {
|
||||
TangemTheme(
|
||||
isDark = true,
|
||||
) {
|
||||
GetBonusAlert(
|
||||
onClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import androidx.compose.ui.res.painterResource
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.tangem.core.ui.components.SecondaryButton
|
||||
import com.tangem.core.ui.components.SpacerH16
|
||||
|
|
@ -23,16 +24,19 @@ import com.tangem.feature.learn2earn.presentation.ui.component.GradientCircle
|
|||
/**
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
@Suppress("ReusedModifierInstance")
|
||||
// TODO: fixme: make function as internal after adding feature interface
|
||||
@Composable
|
||||
fun OneInchStoriesContent(onLearnClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||
fun OneInchStoriesScreen(onLearnClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||
Box(modifier = modifier.fillMaxSize()) {
|
||||
ContentBackground(
|
||||
modifier = modifier
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.align(Alignment.Center),
|
||||
)
|
||||
StoryDescription(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = TangemTheme.dimens.size40)
|
||||
.fillMaxSize(),
|
||||
headerText = stringResource(id = R.string.story_learn_title),
|
||||
bodyText = stringResource(id = R.string.story_learn_description),
|
||||
)
|
||||
|
|
@ -77,13 +81,10 @@ private fun ContentBackground(modifier: Modifier = Modifier) {
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun StoryDescription(headerText: String, bodyText: String) {
|
||||
private fun StoryDescription(headerText: String, bodyText: String, modifier: Modifier = Modifier) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = TangemTheme.dimens.size40)
|
||||
.fillMaxSize(),
|
||||
modifier = modifier,
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Top,
|
||||
) {
|
||||
SpacerH32()
|
||||
Text(
|
||||
|
|
@ -102,4 +103,28 @@ private fun StoryDescription(headerText: String, bodyText: String) {
|
|||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun OneInchStoriesContentPreview_Light() {
|
||||
TangemTheme(
|
||||
isDark = false,
|
||||
) {
|
||||
OneInchStoriesScreen(
|
||||
onLearnClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun OneInchStoriesContentPreview_Dark() {
|
||||
TangemTheme(
|
||||
isDark = true,
|
||||
) {
|
||||
OneInchStoriesScreen(
|
||||
onLearnClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue