Updated on 2026-08-14
This commit is contained in:
parent
6178034e71
commit
a30eeb4f5d
7 changed files with 161 additions and 8 deletions
|
|
@ -28,7 +28,7 @@ import com.tangem.core.ui.res.TangemTheme
|
|||
import com.tangem.core.ui.test.BaseButtonTestTags
|
||||
import com.tangem.core.ui.utils.MultipleClickPreventer
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
@Suppress("LongParameterList", "LongMethod")
|
||||
@Composable
|
||||
fun TangemButton(
|
||||
text: String,
|
||||
|
|
@ -78,7 +78,8 @@ fun TangemButton(
|
|||
ResizableText(
|
||||
modifier = Modifier
|
||||
.weight(1f, fill = false)
|
||||
.heightIn(MinButtonContentSize, maxContentSize),
|
||||
.heightIn(MinButtonContentSize, maxContentSize)
|
||||
.testTag(BaseButtonTestTags.TEXT),
|
||||
text = text,
|
||||
style = textStyle,
|
||||
color = colors.contentColor(enabled = enabled).value,
|
||||
|
|
@ -92,7 +93,8 @@ fun TangemButton(
|
|||
Icon(
|
||||
modifier = Modifier
|
||||
.buttonContentSize(maxContentSize)
|
||||
.padding(vertical = 2.dp),
|
||||
.padding(vertical = 2.dp)
|
||||
.testTag(BaseButtonTestTags.ICON),
|
||||
painter = painterResource(id = iconResId),
|
||||
tint = colors.contentColor(enabled = enabled).value,
|
||||
contentDescription = null,
|
||||
|
|
|
|||
|
|
@ -2,4 +2,6 @@ package com.tangem.core.ui.test
|
|||
|
||||
object BaseButtonTestTags {
|
||||
const val BUTTON = "BASE_BUTTON"
|
||||
const val ICON = "BASE_BUTTON_ICON"
|
||||
const val TEXT = "BASE_BUTTON_TEXT"
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.tangem.core.ui.test
|
||||
|
||||
object ReferralProgramScreenTestTags {
|
||||
const val IMAGE = "REFERRAL_PROGRAM_SCREEN_IMAGE"
|
||||
const val CONDITION_BLOCK = "REFERRAL_PROGRAM_SCREEN_CONDITION_BLOCK"
|
||||
const val INFO_FOR_YOU_TEXT = "REFERRAL_PROGRAM_SCREEN_INFO_FOR_YOU_TEXT"
|
||||
const val INFO_FOR_YOUR_FRIEND_TEXT = "REFERRAL_PROGRAM_INFO_FOR_YOUR_FRIEND_TEXT"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue