Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions apps/www/content/3.components/1.chatbot/conversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Copy and paste the following code in the same folder.
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@repo/shadcn-vue/lib/utils'
import { reactiveOmit } from '@vueuse/core'
import { StickToBottom } from 'vue-stick-to-bottom'

interface Props {
Expand All @@ -55,19 +56,14 @@ const props = withDefaults(defineProps<Props>(), {
mass: 1.25,
anchor: 'none',
})
const delegatedProps = reactiveOmit(props, 'class')
</script>

<template>
<StickToBottom
:aria-label="props.ariaLabel"
v-bind="delegatedProps"
:class="cn('relative flex-1 overflow-y-hidden', props.class)"
role="log"
:initial="props.initial"
:resize="props.resize"
:damping="props.damping"
:stiffness="props.stiffness"
:mass="props.mass"
:anchor="props.anchor"
>
<slot />
</StickToBottom>
Expand Down
10 changes: 3 additions & 7 deletions packages/elements/src/conversation/Conversation.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@repo/shadcn-vue/lib/utils'
import { reactiveOmit } from '@vueuse/core'
import { StickToBottom } from 'vue-stick-to-bottom'

interface Props {
Expand All @@ -22,19 +23,14 @@ const props = withDefaults(defineProps<Props>(), {
mass: 1.25,
anchor: 'none',
})
const delegatedProps = reactiveOmit(props, 'class')
</script>

<template>
<StickToBottom
:aria-label="props.ariaLabel"
v-bind="delegatedProps"
:class="cn('relative flex-1 overflow-y-hidden', props.class)"
role="log"
:initial="props.initial"
:resize="props.resize"
:damping="props.damping"
:stiffness="props.stiffness"
:mass="props.mass"
:anchor="props.anchor"
>
<slot />
</StickToBottom>
Expand Down