This commit is contained in:
2023-07-28 12:18:13 +02:00
parent f5977c1b5d
commit d943e81da4
14 changed files with 209 additions and 69 deletions

View File

@@ -1,15 +1,18 @@
<script setup>
defineProps({
modelValue: String,
modelValue: [String, Boolean, Number],
id: String,
type: {
type: String,
default: 'text',
},
label: String,
placeholder: String,
placeholder: {
type: String,
default: null,
},
error: {
type: Object,
type: String,
default: null,
},
textareaHeight: {
@@ -22,7 +25,8 @@ defineEmits(['update:modelValue']);
<template>
<div :class="['flex w-full', (type === 'checkbox' ? 'flex-row gap-2 items-center bg-gray-200 px-2 py-2 rounded-md' : 'flex-col gap-1')]">
<label :for="id"
<label v-if="id"
:for="id"
class="text-gray-500">{{ label }}</label>
<textarea v-if="type === 'textarea'"
:id="id"

View File

@@ -2,7 +2,7 @@
</script>
<style lang="css">
<style lang="css" scoped>
.header {
background: linear-gradient(237.74deg,#1199a5,#436da7 83%);
}

View File

@@ -2,7 +2,7 @@
</script>
<style lang="css">
<style lang="css" scoped>
.header {
@apply min-h-[220px];
background: linear-gradient(237.74deg,#1199a5,#436da7 83%);

View File

@@ -18,11 +18,15 @@ defineProps({
v-for="(project, key) in projects"
:key="key"
>
<InertiaLink href="/dashboard">
<div class="px-3 py-2 bg-white hover:bg-zinc-300 cursor-pointer">
{{ project.title }}
<div class="flex items-center justify-between px-3 py-2 bg-white hover:bg-zinc-300 cursor-pointer">
<InertiaLink :href="`/dashboard/project/${project.id}`">{{ project.title }}</InertiaLink>
<div>
<InertiaLink
as="button"
class="px-2 py-1 bg-green-200"
:href="`/dashboard/project/${project.id}`">Edit</InertiaLink>
</div>
</InertiaLink>
</div>
</li>
</ul>
<div v-else>