Message List
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
MessageList
import { MessageList } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
messages | { [key: string]: unknown; id: string; }[] | Required | — |
hasMore | boolean | undefined | false | — |
isLoading | boolean | undefined | false | — |
emptyText | string | undefined | "No messages yet" | — |
loadingText | string | undefined | "Loading messages..." | — |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
load-more | [] | — | — |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Exposed methods and values
| Name | Type | Required / default | Description |
|---|---|---|---|
scrollToBottom | () => void | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Default
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
render: (args) => ({
components: { MessageList },
setup() {
return { args, sampleMessages }
},
template: `
<MessageList v-bind="args" class="h-full">
<div v-for="msg in sampleMessages" :key="msg.id" class="flex gap-2 px-4 py-2 hover:bg-muted/50">
<span class="font-medium text-sm text-foreground">{{ msg.sender }}</span>
<span class="text-sm text-muted-foreground">{{ msg.content }}</span>
<span class="ml-auto text-xs text-muted-foreground">{{ msg.time }}</span>
</div>
</MessageList>
`,
}),
args: {
messages: sampleMessages,
},
}
Empty
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
args: {
messages: [],
emptyText: 'No messages yet. Start the conversation!',
},
render: (args) => ({
components: { MessageList },
setup() {
return { args }
},
template: '<MessageList v-bind="args" class="h-full" />',
}),
}
Loading
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
args: {
messages: [],
isLoading: true,
loadingText: 'Loading messages...',
},
render: (args) => ({
components: { MessageList },
setup() {
return { args }
},
template: '<MessageList v-bind="args" class="h-full" />',
}),
}