Skip to content

Commit 5e04298

Browse files
committed
Add error handling support to AppCombobox and improve AppRadioButton layout
1 parent 95d606c commit 5e04298

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

stubs/resources/js/Components/Form/AppCombobox.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<div ref="wrapperRef" class="relative w-48">
33
<AppButton
44
class="bg-neutral-1 text-neutral-12 placeholder-neutral-9 ring-neutral-7 focus:ring-neutral-7 mt-1 flex w-full justify-between rounded-md border-0 px-3 py-2 align-middle ring-1 shadow-xs ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6"
5+
:class="{
6+
'input-error': hasError
7+
}"
58
aria-haspopup="true"
69
:aria-expanded="isOpen"
710
@click="toggleState"
@@ -91,6 +94,10 @@ const props = defineProps({
9194
options: {
9295
type: Array,
9396
default: () => []
97+
},
98+
hasError: {
99+
type: Boolean,
100+
default: false
94101
}
95102
})
96103

stubs/resources/js/Components/Form/AppRadioButton.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
2-
<div class="mb-4 flex items-center">
3-
<AppLabel class="hover:cursor-pointer" :for="$attrs.id">
2+
<div class="mb-4">
3+
<AppLabel
4+
class="flex items-center hover:cursor-pointer"
5+
:for="$attrs.id"
6+
>
47
<input
58
v-bind="$attrs"
69
type="radio"

0 commit comments

Comments
 (0)