Skip to content

Commit 53d4ece

Browse files
Replace hard-coded icons with package
1 parent 233a0a5 commit 53d4ece

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

package-lock.json

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@inertiajs/vue3": "^1.2.0",
17+
"lucide-vue-next": "^0.454.0",
1718
"vue": "^3.5.6"
1819
},
1920
"type": "module"

resources/assets/js/Layout.vue

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup>
2+
import { ArrowRightLeft, CirclePlus, House, LogOut } from 'lucide-vue-next';
23
import { computed } from 'vue';
34
import { Link, usePage } from '@inertiajs/vue3';
45
@@ -13,20 +14,20 @@ const user = computed(() => page.props.auth.user);
1314
<div class="mx-auto flex-1 flex items-center justify-between max-w-3xl">
1415
<div class="flex space-x-10">
1516
<Link class="flex items-center text-gray-500 hover:text-black" href="/dashboard">
16-
<svg class="h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
17-
<div class="ml-1 text-sm">Dashboard</div>
17+
<House :size="16" />
18+
<div class="ml-2 text-sm">Dashboard</div>
1819
</Link>
1920
<Link class="flex items-center text-gray-500 hover:text-black" href="/transactions">
20-
<svg class="h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3 4 7l4 4"/><path d="M4 7h16"/><path d="m16 21 4-4-4-4"/><path d="M20 17H4"/></svg>
21-
<div class="ml-1 text-sm">Transactions</div>
21+
<ArrowRightLeft :size="16" />
22+
<div class="ml-2 text-sm">Transactions</div>
2223
</Link>
2324
</div>
2425
<div class="flex space-x-5">
2526
<Link class="flex items-center text-gray-500 hover:text-black" href="/transactions/create">
26-
<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/></svg>
27+
<CirclePlus :size="16" />
2728
</Link>
2829
<Link class="flex items-center text-gray-500 hover:text-black" href="/log-out">
29-
<svg class="h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/></svg>
30+
<LogOut :size="16" />
3031
</Link>
3132
</div>
3233
</div>

resources/assets/js/Pages/Transaction/Index.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup>
2+
import { Tag } from 'lucide-vue-next';
23
import { computed } from 'vue';
34
45
const props = defineProps({
@@ -62,10 +63,10 @@ const getTransactionsBySpan = (span) => {
6263

6364
<template>
6465
<div class="my-10 mx-auto max-w-3xl">
65-
<div class="mb-10">
66+
<div class="mb-5">
6667
<div class="font-bold text-xl">Transactions</div>
6768
</div>
68-
<div class="space-y-10">
69+
<div class="space-y-5">
6970
<div v-for="span in spans" class="flex">
7071
<div class="w-48">
7172
<div class="font-semibold">{{ getMonthName(span.month) }}</div>
@@ -76,7 +77,7 @@ const getTransactionsBySpan = (span) => {
7677
<div class="flex items-center justify-between" v-for="transaction in getTransactionsBySpan(span)">
7778
<div class="flex-1 text-sm text-gray-500">{{ transaction.description }}</div>
7879
<div v-if="transaction.tag_id" class="flex-1 flex items-center">
79-
<svg class="h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"/><circle cx="7.5" cy="7.5" r=".5" fill="currentColor"/></svg>
80+
<Tag class="mr-1" :size="14" />
8081
<span class="text-sm text-gray-500">{{ transaction.tag.name }}</span>
8182
</div>
8283
<div class="w-20 text-right text-sm" :class="'text-' + (transaction.type === 'earning' ? 'green' : 'red') + '-600'" v-html="(transaction.type === 'earning' ? '+' : '-') + props.currency + (transaction.amount / 100).toFixed(2)"></div>

0 commit comments

Comments
 (0)