import type { Meta, StoryObj } from '@storybook/vue3-vite'
import ProjectCard from '../../components/project/card/ProjectCard.vue'
const meta = {
title: 'Base/ProjectCard',
component: ProjectCard,
decorators: [
(story) => ({
components: { story },
template: '
',
}),
],
} satisfies Meta
export default meta
type Story = StoryObj
export const Default: Story = {
args: {
link: '/mod/example-mod',
layout: 'grid',
title: 'Example Mod',
author: { name: 'Prospector', link: 'https://modrinth.com/user/Prospector' },
summary:
'An example mod that demonstrates the ProjectCard component with a detailed description.',
iconUrl: 'https://cdn.modrinth.com/data/AANobbMI/icon.png',
downloads: 1234567,
followers: 12345,
dateUpdated: '2024-01-15T00:00:00Z',
tags: ['adventure', 'decoration'],
environment: {
clientSide: 'required',
serverSide: 'optional',
},
},
}
export const AllTypes: Story = {
render: () => ({
components: { ProjectCard },
template: `
`,
}),
}
export const WithStatus: Story = {
render: () => ({
components: { ProjectCard },
template: `
`,
}),
}
export const ServerProject: Story = {
args: {
link: '/server/example-server',
layout: 'grid',
title: 'Example Server',
author: { name: 'ServerAdmin', link: '/user/ServerAdmin' },
summary: 'A live multiplayer server with required content and regional metadata.',
iconUrl: 'https://cdn.modrinth.com/data/AANobbMI/icon.png',
isServerProject: true,
serverOnlinePlayers: 128,
serverStatusOnline: true,
serverRecentPlays: 8420,
serverPing: 42,
serverRegion: 'us',
serverModpackContent: {
name: 'Example Modpack',
icon: 'https://cdn.modrinth.com/data/AANobbMI/icon.png',
showCustomModpackTooltip: true,
},
tags: ['adventure', 'multiplayer', 'quests'],
allTags: ['adventure', 'multiplayer', 'quests', 'economy', 'roleplay', 'survival'],
dateUpdated: '2024-01-15T00:00:00Z',
},
}
export const DisplayModes: StoryObj = {
decorators: [], // Remove default decorator for this story
render: () => ({
components: { ProjectCard },
template: `
`,
}),
}