mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
merged lyxui into dashboard
This commit is contained in:
20
dashboard/components/LyxUi/Button.vue
Normal file
20
dashboard/components/LyxUi/Button.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
export type ButtonType = 'primary' | 'secondary' | 'outline' | 'outlined' | 'danger';
|
||||
|
||||
const props = defineProps<{ type: ButtonType, link?: string, target?: string, disabled?: boolean }>();
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NuxtLink tag="div" :to="disabled ? '' : link" :target="target"
|
||||
class="poppins w-fit cursor-pointer px-4 py-1 rounded-md outline outline-[1px] text-text" :class="{
|
||||
'bg-lyx-primary-dark outline-lyx-primary hover:bg-lyx-primary-hover': type === 'primary',
|
||||
'bg-lyx-widget-lighter outline-lyx-widget-lighter hover:bg-lyx-widget-light': type === 'secondary',
|
||||
'bg-lyx-transparent outline-lyx-widget-lighter hover:bg-lyx-widget-light': (type === 'outline' || type === 'outlined'),
|
||||
'bg-lyx-danger-dark outline-lyx-danger hover:bg-lyx-danger': type === 'danger',
|
||||
'!bg-lyx-widget !outline-lyx-widget-lighter !cursor-not-allowed': disabled === true,
|
||||
}">
|
||||
<slot></slot>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
10
dashboard/components/LyxUi/Card.vue
Normal file
10
dashboard/components/LyxUi/Card.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-fit h-fit rounded-md bg-lyx-widget p-4 outline outline-[1px] outline-lyx-background-lighter">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
11
dashboard/components/LyxUi/Icon.vue
Normal file
11
dashboard/components/LyxUi/Icon.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
const props = defineProps<{ icon: string }>();
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="material-symbols-outlined">
|
||||
{{ props.icon }}
|
||||
</span>
|
||||
</template>
|
||||
24
dashboard/components/LyxUi/Input.vue
Normal file
24
dashboard/components/LyxUi/Input.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
|
||||
const props = defineProps<{ placeholder?: string, modelValue: string, type?: string }>();
|
||||
|
||||
const emits = defineEmits<{
|
||||
(e: "update:modelValue", value: string): void
|
||||
}>();
|
||||
|
||||
|
||||
const handleChange = (event: Event) => {
|
||||
const target = event.target as HTMLInputElement;
|
||||
emits('update:modelValue', target.value);
|
||||
};
|
||||
|
||||
|
||||
//TODO: FUNCTIONALITY + PLACEHOLDER DARK
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input
|
||||
class="bg-lyx-widget-light text-lyx-text-dark poppins rounded-md outline outline-[1px] outline-lyx-widget-lighter"
|
||||
:type="props.type ?? 'text'" :placeholder="props.placeholder" :value="props.modelValue" @input="handleChange">
|
||||
</template>
|
||||
@@ -79,6 +79,5 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
components: true,
|
||||
extends: ['../lyx-ui'],
|
||||
compatibilityDate: '2024-11-16'
|
||||
})
|
||||
Reference in New Issue
Block a user