File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
apps/www/content/3.components/1.chatbot
packages/elements/src/conversation Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Copy and paste the following code in the same folder.
3434<script setup lang="ts">
3535import type { HTMLAttributes } from 'vue'
3636import { cn } from '@repo/shadcn-vue/lib/utils'
37+ import { reactiveOmit } from '@vueuse/core'
3738import { StickToBottom } from 'vue-stick-to-bottom'
3839
3940interface Props {
@@ -55,19 +56,14 @@ const props = withDefaults(defineProps<Props>(), {
5556 mass: 1.25,
5657 anchor: 'none',
5758})
59+ const delegatedProps = reactiveOmit(props, 'class')
5860</script>
5961
6062<template>
6163 <StickToBottom
62- :aria-label="props.ariaLabel "
64+ v-bind="delegatedProps "
6365 :class="cn('relative flex-1 overflow-y-hidden', props.class)"
6466 role="log"
65- :initial="props.initial"
66- :resize="props.resize"
67- :damping="props.damping"
68- :stiffness="props.stiffness"
69- :mass="props.mass"
70- :anchor="props.anchor"
7167 >
7268 <slot />
7369 </StickToBottom>
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import type { HTMLAttributes } from ' vue'
33import { cn } from ' @repo/shadcn-vue/lib/utils'
4+ import { reactiveOmit } from ' @vueuse/core'
45import { StickToBottom } from ' vue-stick-to-bottom'
56
67interface Props {
@@ -22,19 +23,14 @@ const props = withDefaults(defineProps<Props>(), {
2223 mass: 1.25 ,
2324 anchor: ' none' ,
2425})
26+ const delegatedProps = reactiveOmit (props , ' class' )
2527 </script >
2628
2729<template >
2830 <StickToBottom
29- :aria-label = " props.ariaLabel "
31+ v-bind = " delegatedProps "
3032 :class =" cn('relative flex-1 overflow-y-hidden', props.class)"
3133 role =" log"
32- :initial =" props.initial"
33- :resize =" props.resize"
34- :damping =" props.damping"
35- :stiffness =" props.stiffness"
36- :mass =" props.mass"
37- :anchor =" props.anchor"
3834 >
3935 <slot />
4036 </StickToBottom >
You can’t perform that action at this time.
0 commit comments