Skip to content

Commit

Permalink
Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
SalomonBrys committed May 13, 2024
1 parent 241083a commit 9eddcb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion compose-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ kotlin {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(projects.emojiCompose)
implementation(projects.emojiComposeM2)
}
getByName("jvmMain").dependencies {
implementation(compose.desktop.currentOs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.kodein.emoji.Emoji
import org.kodein.emoji.compose.NotoAnimatedEmoji
import org.kodein.emoji.compose.WithNotoAnimatedEmoji
import org.kodein.emoji.compose.WithPlatformEmoji
import org.kodein.emoji.compose.withEmoji
import org.kodein.emoji.compose.*
import org.kodein.emoji.compose.m2.TextWithNotoAnimatedEmoji
import org.kodein.emoji.compose.m2.TextWithNotoImageEmoji
import org.kodein.emoji.compose.m2.TextWithPlatformEmoji
import org.kodein.emoji.mediumLight_mediumDark
import org.kodein.emoji.people_body.family.PeopleHoldingHands
import org.kodein.emoji.smileys_emotion.emotion.Collision
Expand All @@ -32,21 +32,21 @@ fun App() {
modifier = Modifier.fillMaxSize()
) {
ProvideTextStyle(TextStyle(fontSize = 32.sp)) {
WithPlatformEmoji(
TextWithPlatformEmoji(
"Platform:\nWhen I see :people-holding-hands~medium-light,medium-dark:, my <3 goes :collision: :D!".withEmoji()
) { text, inlineContent ->
Text(text = text, inlineContent = inlineContent)
}
)

WithNotoAnimatedEmoji(
TextWithNotoImageEmoji(
"images:\nWhen I see ${Emoji.PeopleHoldingHands.mediumLight_mediumDark}, my ${Emoji.RedHeart} goes ${Emoji.Collision} ${Emoji.Smile}!"
)

TextWithNotoAnimatedEmoji(
"Animated:\nWhen I see ${Emoji.PeopleHoldingHands.mediumLight_mediumDark}, my ${Emoji.RedHeart} goes ${Emoji.Collision} ${Emoji.Smile}!"
) { text, inlineContent ->
Text(text = text, inlineContent = inlineContent)
}
)
}
NotoAnimatedEmoji(
emoji = Emoji.ImpSmile,
modifier = Modifier.size(64.dp).padding(top = 16.dp),
modifier = Modifier.size(64.dp),
iterations = 2,
stopAt = 0.76f
)
Expand Down

0 comments on commit 9eddcb3

Please sign in to comment.