Skip to content

Commit

Permalink
feat: navigate to bento page when credit text is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
aslansari committed May 17, 2024
1 parent bbbe7ab commit aed6d7c
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.aslansari.spiritvisor.cocktail.component

import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
Expand All @@ -9,9 +11,11 @@ import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withStyle
Expand All @@ -31,7 +35,16 @@ fun CreditText(modifier: Modifier = Modifier) {
}
append(" with")
}
Text(creditText, style = MaterialTheme.typography.body2.copy(color = Color(0xFF697077)))
val uriHandler = LocalUriHandler.current
Text(
modifier = Modifier.clickable(
onClick = { uriHandler.openUri("https://bento.me/aslansari") },
interactionSource = remember { MutableInteractionSource() },
indication = null,
) ,
text = creditText,
style = MaterialTheme.typography.body2.copy(color = Color(0xFF697077))
)
Spacer(Modifier.size(2.dp))
Icon(
imageVector = Icons.HeartSharp,
Expand Down

0 comments on commit aed6d7c

Please sign in to comment.