Better error norifications
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
let { eventData = $bindable(), errors = $bindable() } = $props<{
|
||||
let { eventData = $bindable() } = $props<{
|
||||
eventData: {
|
||||
name: string;
|
||||
date: string;
|
||||
};
|
||||
errors: Record<string, string>;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
@@ -22,9 +21,6 @@
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||||
placeholder="Enter event name"
|
||||
/>
|
||||
{#if errors.name}
|
||||
<p class="mt-1 text-sm text-red-600">{errors.name}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -37,8 +33,5 @@
|
||||
bind:value={eventData.date}
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||||
/>
|
||||
{#if errors.date}
|
||||
<p class="mt-1 text-sm text-red-600">{errors.date}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user