Skip to content

Commit 716ac61

Browse files
committed
fix(elements): preserve variant reactivity in PromptInputButton
1 parent cd7398b commit 716ac61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/elements/src/prompt-input/PromptInputButton.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { HTMLAttributes } from 'vue'
33
import { InputGroupButton } from '@repo/shadcn-vue/components/ui/input-group'
44
import { cn } from '@repo/shadcn-vue/lib/utils'
5-
import { Comment, computed, Text, useSlots } from 'vue'
5+
import { Comment, computed, Text, toRef, useSlots } from 'vue'
66
77
type InputGroupButtonProps = InstanceType<typeof InputGroupButton>['$props']
88
@@ -38,7 +38,9 @@ const computedSize = computed(() => {
3838
return validChildren.length > 1 ? 'sm' : 'icon-sm'
3939
})
4040
41-
const { size, variant, class: _, ...restProps } = props
41+
const variant = toRef(props, 'variant')
42+
43+
const { size, variant: _, class: __, ...restProps } = props
4244
</script>
4345

4446
<template>

0 commit comments

Comments
 (0)