style(prettier): run tool

This commit is contained in:
2025-12-20 16:08:45 +01:00
parent 07b35aad8e
commit f324854d42
3 changed files with 87 additions and 84 deletions
+21 -18
View File
@@ -3,27 +3,30 @@ import { computed, onMounted } from "vue";
import * as icons from "lucide-vue-next";
interface Props {
name: string;
color?: string;
strokeWidth?: string;
defaultClass?: string;
name: string;
color?: string;
strokeWidth?: string;
defaultClass?: string;
}
const props = withDefaults(defineProps<Props>(), {
color: "currentColor",
strokeWidth: "2",
defaultClass: "lucide",
color: "currentColor",
strokeWidth: "2",
defaultClass: "lucide",
});
function kebab2camel(kebab: string): string {
return kebab
.split("-")
.map((item) => item.charAt(0).toUpperCase() + item.slice(1).toLowerCase())
.join("");
return kebab
.split("-")
.map(
(item) =>
item.charAt(0).toUpperCase() + item.slice(1).toLowerCase(),
)
.join("");
}
onMounted(() => {
console.log(kebab2camel(props.name));
console.log(kebab2camel(props.name));
});
// @ts-expect-error: cannot infer type of all exported data
@@ -31,10 +34,10 @@ const icon = computed(() => icons[kebab2camel(props.name)]);
</script>
<template>
<component
:is="icon"
:color="color"
:stroke-width="strokeWidth"
:default-class="defaultClass"
/>
<component
:is="icon"
:color="color"
:stroke-width="strokeWidth"
:default-class="defaultClass"
/>
</template>