Files
forkmessager/client-mobile/chats/presentation/components/EmojiPicker.kt
Халимов Рустам 1fb1be47dd Приложение
2026-04-14 01:15:54 +03:00

40 lines
1.2 KiB
Kotlin

package chats.presentation.components
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@Composable
fun EmojiPicker(
onEmojiSelected: (String) -> Unit
) {
val emojis = listOf("😀", "😂", "😍", "👍", "🔥", "😭", "🙏", "😎", "🤔", "🎉", "❤️", "") // Базовый набор
LazyVerticalGrid(
columns = GridCells.Fixed(6),
modifier = Modifier
.fillMaxWidth()
.height(200.dp)
.padding(8.dp)
) {
items(emojis) { emoji ->
Box(
modifier = Modifier
.size(48.dp)
.clickable { onEmojiSelected(emoji) },
contentAlignment = Alignment.Center
) {
Text(text = emoji, fontSize = 24.sp)
}
}
}
}