Skip to content

Commit dd89ff3

Browse files
committed
feat: enhance Input component with custom styling and right icon slot
1 parent 55639f5 commit dd89ff3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adminforth/spa/src/afcl/Input.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22

3-
<div class="flex z-0" :class="{'opacity-50' : readonly}">
3+
<div class="afcl-input flex z-0 relative" :class="{'opacity-50' : readonly}">
44
<span
55
v-if="$slots.prefix || prefix"
66
class="inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-s-0 border-gray-300 rounded-s-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600">
@@ -21,7 +21,9 @@
2121
:disabled="readonly"
2222
>
2323

24-
24+
<div v-if="$slots.rightIcon" class="absolute inset-y-0 right-0 pr-3 flex items-center">
25+
<slot name="rightIcon" />
26+
</div>
2527
<span
2628
v-if="$slots.suffix || suffix"
2729
class="inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-s-0 border-gray-300 rounded-e-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600 ">

0 commit comments

Comments
 (0)