Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions src/lib/ui/primitives/EmoteBoard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@
});

let gifTab = $derived(tab === 'gif');
let cellSize = $derived(tab === 'sticker' ? 72 : 32);
let cellSize = $derived(
tab === 'sticker' ? 72 :
tab === 'emoticon' ? 48 :
32
);

let boardStyle = $derived.by(() => {
const size = resizable ? readBoardSize() : null;
Expand Down Expand Up @@ -367,7 +371,9 @@
{/if}
</nav>

<div class={['grids', { sticker: tab === 'sticker' }]}>
<div class={['grids', {
sticker: tab === 'sticker',
emoji: tab === 'emoticon'}]}>
{#if onPickUnicode && query.trim() !== ''}
{@const text = query.trim()}
<button
Expand Down Expand Up @@ -672,9 +678,8 @@
padding: 0;
}

.grids.sticker {
--emote-cell: 5rem;
}
.board-body {
--emote-cell: 2.5rem;

.grids li button,
.grids .unicode button {
Expand All @@ -684,11 +689,18 @@
border-radius: var(--radius);
cursor: pointer;
display: flex;
height: var(--emote-cell, 2.5rem);
justify-content: center;
padding: var(--space-100);
width: var(--emote-cell, 2.5rem);

height: var(--emote-cell);
width: var(--emote-cell);
}

.grids.sticker button {
height: calc(var(--emote-cell) * 2);
width: calc(var(--emote-cell) * 2);
}
}

/* Sized to the 32px custom emote beside it, not to the surrounding type. */
.grids .unicode button {
Expand Down
Loading