Skip to content

Commit

Permalink
♻️ Use clsx with svelte 5.16 (#810)
Browse files Browse the repository at this point in the history
* ⬆️ Upgrade Svelte to v5.16.0
* ♻️ Change `class:*` to object
  ref. https://svelte.dev/docs/svelte/class
  • Loading branch information
usagizmo authored Dec 25, 2024
1 parent a0bf198 commit 54c9cbe
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@sveltejs/kit": "^2.12.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tailwindcss/vite": "4.0.0-beta.3",
"svelte": "5.1.0",
"svelte": "^5.16.0",
"svelte-check": "^4.0.5",
"tailwindcss": "4.0.0-beta.3",
"tslib": "^2.8.0",
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/features/comment/Comment.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
</script>

<div
class="py-2.5 duration-200"
class:bg-slate-100={isDeleting}
class={['py-2.5 duration-200', { 'bg-slate-100': isDeleting }]}
role="listitem"
onmouseenter={() => (isActionVisible = card.me ? true : false)}
onmouseleave={() => (isActionVisible = false)}
Expand Down
12 changes: 8 additions & 4 deletions apps/web/src/routes/admin/AdminHeaderTabs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@
{/if}
<a
{href}
class="relative inline-flex items-center justify-center space-x-1 rounded-md px-5 py-2 text-sm text-zinc-500 duration-200"
class:font-bold={isActive}
class:pointer-events-none={isActive}
class:text-zinc-500={!isActive}
class={[
'relative inline-flex items-center justify-center space-x-1 rounded-md px-5 py-2 text-sm text-zinc-500 duration-200',
{
'font-bold': isActive,
'pointer-events-none': isActive,
'text-zinc-500': !isActive,
},
]}
>
{name}
</a>
Expand Down
96 changes: 55 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 54c9cbe

Please sign in to comment.