Skip to content

Commit 0bccb3c

Browse files
authored
Lucide icons (#104)
* Install `lucide-vue-next ` * Remove Heroicons usage * Remove Heroicons
1 parent a8ffa66 commit 0bccb3c

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

bun.lockb

16 Bytes
Binary file not shown.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"devDependencies": {
3-
"@heroicons/vue": "^2.2.0",
43
"@inertiajs/vue3": "^2.0.3",
54
"@sentry/vue": "^8.54.0",
65
"@tailwindcss/forms": "^0.5.10",
@@ -20,6 +19,7 @@
2019
},
2120
"type": "module",
2221
"dependencies": {
23-
"caniuse-lite": "^1.0.30001697"
22+
"caniuse-lite": "^1.0.30001697",
23+
"lucide-vue-next": "^0.479.0"
2424
}
2525
}

resources/js/Components/Header.vue

+11-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="flex h-16 items-center justify-between">
66
<div class="flex items-center">
77
<Link :href="route('home')">
8-
<SparklesIcon class="h-8 w-8 shrink-0 text-brand-800" />
8+
<SparklesIcon class="size-7 shrink-0 text-brand-800" />
99
</Link>
1010
</div>
1111

@@ -38,13 +38,13 @@
3838
class="relative inline-flex items-center justify-center rounded-md bg-brand-100 p-2 text-brand-900 hover:bg-brand-900 hover:text-white cursor-pointer"
3939
>
4040
<span class="sr-only">Open main menu</span>
41-
<XMarkIcon
41+
<CloseIcon
4242
v-if="mobileMenuOpen"
43-
class="block h-6 w-6"
43+
class="block size-6"
4444
/>
45-
<Bars3Icon
45+
<MenuIcon
4646
v-else
47-
class="block h-6 w-6"
47+
class="block size-6"
4848
/>
4949
</button>
5050
</div>
@@ -82,6 +82,12 @@
8282
import { ref, onMounted } from "vue";
8383
import { router } from '@inertiajs/vue3'
8484
85+
import {
86+
Sparkles as SparklesIcon,
87+
Menu as MenuIcon,
88+
X as CloseIcon,
89+
} from 'lucide-vue-next';
90+
8591
const props = defineProps({
8692
menu: Array,
8793
});

resources/js/Components/Notice.vue

+17-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
}'
1010
role="alert"
1111
>
12-
<component
13-
v-if="icon"
14-
:is="icon"
15-
class="shrink-0 inline w-6 h-6 me-3"
12+
<CircleCheckIcon
13+
v-if="type === 'success'"
14+
class="shrink-0 inline size-5 me-3"
15+
/>
16+
<CircleXIcon
17+
v-else-if="type === 'error'"
18+
class="shrink-0 inline size-5 me-3"
19+
/>
20+
<CircleAlertIcon
21+
v-else
22+
class="shrink-0 inline size-5 me-3"
1623
/>
1724
<p v-text="message"></p>
1825
</div>
@@ -22,6 +29,12 @@
2229
import { ref, onMounted } from 'vue';
2330
import { router, usePage } from "@inertiajs/vue3";
2431
32+
import {
33+
CircleCheck as CircleCheckIcon,
34+
CircleX as CircleXIcon,
35+
CircleAlert as CircleAlertIcon,
36+
} from 'lucide-vue-next';
37+
2538
const page = usePage();
2639
2740
const active = ref(false);
@@ -34,15 +47,12 @@
3447
let error = Object.values(page.props.errors)[0] || page.props.error;
3548
3649
if (page.props.success) {
37-
icon.value = "CheckCircleIcon";
3850
type.value = "success";
3951
message.value = page.props.success;
4052
} else if (error) {
41-
icon.value = "XCircleIcon";
4253
type.value = "error";
4354
message.value = error;
4455
} else if (page.props.warning) {
45-
icon.value = "ExclamationCircleIcon";
4656
type.value = "warning";
4757
message.value = page.props.warning;
4858
}

resources/js/app.js

-16
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ import { route, ZiggyVue } from 'ziggy-js';
55
import { createApp, defineAsyncComponent, h } from 'vue';
66
import { createInertiaApp, Link, Head } from '@inertiajs/vue3';
77

8-
import {
9-
Bars3Icon,
10-
XMarkIcon,
11-
SparklesIcon,
12-
CheckCircleIcon,
13-
XCircleIcon,
14-
ExclamationCircleIcon,
15-
} from '@heroicons/vue/24/outline';
16-
178
import { userCan } from "@js/utilities/permissions.js";
189

1910
const AppLayout = defineAsyncComponent(() => import('@js/Layouts/App.vue'));
@@ -42,13 +33,6 @@ createInertiaApp({
4233

4334
VueApp.mixin({ methods: { userCan } });
4435

45-
VueApp.component('Bars3Icon', Bars3Icon)
46-
.component('XMarkIcon', XMarkIcon)
47-
.component('SparklesIcon', SparklesIcon)
48-
.component('CheckCircleIcon', CheckCircleIcon)
49-
.component('XCircleIcon', XCircleIcon)
50-
.component('ExclamationCircleIcon', ExclamationCircleIcon);
51-
5236
VueApp.component('Head', Head)
5337
.component('Link', Link)
5438
.component('PageTitle', defineAsyncComponent(() => import('@js/Components/PageTitle.vue')))

0 commit comments

Comments
 (0)