This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / lib / components / repo / RepoCard.stories.svelte
1.4 kB 54 lines
1<script module lang="ts"> 2 import { defineMeta } from "@storybook/addon-svelte-csf"; 3 import MockAuthProvider from "$lib/components/testing/MockAuthProvider.svelte"; 4 import RepoCard from "./RepoCard.svelte"; 5 import type { RepoCardData } from "$lib/components/profile/types"; 6 7 const repo: RepoCardData = { 8 name: "core", 9 repoDid: "did:plc:3p7ejjxnufohsygt5vbyxb2i", 10 ownerHandle: "tangled.org", 11 description: "The knot server, appview, and everything that makes tangled tick.", 12 createdAt: "2025-06-01T10:30:00Z", 13 language: "Go", 14 stars: 42, 15 forks: 7, 16 issues: 3, 17 pulls: 5, 18 viewerStarRkey: null 19 }; 20 21 const { Story } = defineMeta({ 22 title: "Repo/RepoCard", 23 component: RepoCard, 24 tags: ["autodocs"], 25 argTypes: { 26 starButton: { control: "boolean" }, 27 showOwner: { control: "boolean" }, 28 border: { control: "boolean" }, 29 shadow: { control: "boolean" }, 30 background: { control: "boolean" } 31 }, 32 args: { 33 repo, 34 starButton: false, 35 showOwner: true, 36 border: true, 37 shadow: false, 38 background: true 39 } 40 }); 41</script> 42 43<Story name="Default" /> 44<Story name="No owner" args={{ showOwner: false }} /> 45<Story name="Elevated" args={{ shadow: true }} /> 46<Story name="Plain (timeline)" args={{ border: false, shadow: false, background: false }} /> 47 48<Story name="With star button"> 49 {#snippet template(args)} 50 <MockAuthProvider> 51 <RepoCard {...args} starButton /> 52 </MockAuthProvider> 53 {/snippet} 54</Story>