import { MinecraftServerIcon } from '@modrinth/assets'
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { NotificationToast } from '../../components/notifications'
const avatarUrl =
'https://cdn.modrinth.com/user/6Qo4A5QT/9d81be1a9fb1afd163b7f2f05a791955e7693c90.png'
const meta = {
title: 'Notifications/Toasts',
parameters: {
layout: 'centered',
},
decorators: [
(story) => ({
components: { story },
template:
'
',
}),
],
} satisfies Meta
export default meta
type Story = StoryObj
const noop = () => console.log('Notification action')
export const FigmaExamples: Story = {
render: () => ({
components: { NotificationToast },
setup() {
return {
avatarUrl,
instanceIconUrl: MinecraftServerIcon,
noop,
}
},
template: /* html */ `
`,
}),
}
export const ServerInvite: Story = {
render: () => ({
components: { NotificationToast },
setup() {
return {
avatarUrl,
instanceIconUrl: MinecraftServerIcon,
noop,
}
},
template: /* html */ `
`,
}),
}
export const MissingAvatarFallback: Story = {
render: () => ({
components: { NotificationToast },
setup() {
return {
instanceIconUrl: MinecraftServerIcon,
noop,
}
},
template: /* html */ `
`,
}),
}
export const WaitingDownload: Story = {
render: () => ({
components: { NotificationToast },
setup() {
return {
instanceIconUrl: MinecraftServerIcon,
noop,
}
},
template: /* html */ `
`,
}),
}