build: switch from yarn to npm to manage js dependencies and move js contents to root
yarn v1 is being deprecated and starts to have some issues Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
25
src/components/Dashboard/LinkedNumberDashboardTile.vue
Normal file
25
src/components/Dashboard/LinkedNumberDashboardTile.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<router-link
|
||||
v-if="to?.name"
|
||||
:to="to"
|
||||
class="bg-white dark:bg-black mb-4 shadow-md rounded p-4"
|
||||
>
|
||||
<NumberDashboardTile :number="number" :subtitle="subtitle" :style="false">
|
||||
<template #subtitle>
|
||||
<slot name="subtitle" />
|
||||
</template>
|
||||
</NumberDashboardTile>
|
||||
</router-link>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import NumberDashboardTile from "./NumberDashboardTile.vue";
|
||||
defineProps<{
|
||||
number?: number;
|
||||
subtitle?: string;
|
||||
to?: {
|
||||
name: string;
|
||||
params?: Record<string, any>;
|
||||
query?: Record<string, any>;
|
||||
};
|
||||
}>();
|
||||
</script>
|
||||
20
src/components/Dashboard/NumberDashboardTile.vue
Normal file
20
src/components/Dashboard/NumberDashboardTile.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<article
|
||||
:class="{ 'bg-white dark:bg-black mb-4 shadow-md rounded p-4': style }"
|
||||
>
|
||||
<p class="text-violet-3 text-4xl font-bold">{{ number }}</p>
|
||||
<slot name="subtitle">
|
||||
{{ subtitle }}
|
||||
</slot>
|
||||
</article>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
number?: number;
|
||||
subtitle?: string;
|
||||
style?: boolean;
|
||||
}>(),
|
||||
{ style: true }
|
||||
);
|
||||
</script>
|
||||
Reference in New Issue
Block a user