Skip to content

Commit

Permalink
feat(BaseAutocomplete): update class bindings, add color-focus prop
Browse files Browse the repository at this point in the history
  • Loading branch information
driss-chelouati committed Feb 22, 2024
1 parent 2c45109 commit 8cff245
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .playground/pages/tests/form/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ const people = ref([
rounded="md"
placeholder="e.g. Nuxt"
label="Framework"
color-focus
/>
</div>
<div class="flex-1">
Expand All @@ -453,6 +454,7 @@ const people = ref([
rounded="md"
placeholder="e.g. Nuxt"
label="Framework"
color-focus
/>
</div>
<div class="flex-1">
Expand All @@ -464,6 +466,7 @@ const people = ref([
rounded="md"
placeholder="e.g. Nuxt"
label="Framework"
color-focus
/>
</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions components/form/BaseAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ const props = withDefaults(
*/
clearable?: boolean
/**
* Wether the border should change color when focused
*/
colorFocus?: boolean
/**
* Display a chevron icon to open suggestions
*/
Expand Down Expand Up @@ -234,6 +239,7 @@ const props = withDefaults(
loading: false,
disabled: false,
clearable: false,
colorFocus: false,
clearValue: undefined,
clearIcon: 'lucide:x',
chipClearIcon: 'lucide:x',
Expand Down Expand Up @@ -494,6 +500,7 @@ const internal = ref<any>(modelValue)
props.icon && 'nui-has-icon',
props.labelFloat && 'nui-autocomplete-label-float',
props.loading && 'nui-autocomplete-loading',
props.colorFocus && 'nui-autocomplete-focus',
]"
as="div"
>
Expand Down

0 comments on commit 8cff245

Please sign in to comment.