Reduce margins and make unselected emoji background to be clear
This commit is contained in:
@@ -30,7 +30,7 @@ public struct EmojiPickerView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let columns = [
|
let columns = [
|
||||||
GridItem(.adaptive(minimum: 80))
|
GridItem(.adaptive(minimum: 36))
|
||||||
]
|
]
|
||||||
|
|
||||||
let emojis: [Emoji]
|
let emojis: [Emoji]
|
||||||
@@ -46,11 +46,11 @@ public struct EmojiPickerView: View {
|
|||||||
|
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
LazyVGrid(columns: columns, spacing: 20) {
|
LazyVGrid(columns: columns) {
|
||||||
ForEach(searchResults, id: \.self) { emoji in
|
ForEach(searchResults, id: \.self) { emoji in
|
||||||
RoundedRectangle(cornerRadius: 16)
|
RoundedRectangle(cornerRadius: 16)
|
||||||
.fill((selectedEmoji == emoji ? selectedColor : Color.gray).opacity(0.4))
|
.fill((selectedEmoji == emoji ? selectedColor : Color.clear).opacity(0.4))
|
||||||
.frame(width: 64, height: 64)
|
.frame(width: 36, height: 36)
|
||||||
.overlay {
|
.overlay {
|
||||||
Text(emoji.value)
|
Text(emoji.value)
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
|
|||||||
Reference in New Issue
Block a user