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 / profile / FollowCard.stories.svelte
1.2 kB 45 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 FollowCard from "./FollowCard.svelte"; 5 import type { PersonData } from "./types"; 6 7 const person: PersonData = { 8 did: "did:plc:3p7ejjxnufohsygt5vbyxb2i", 9 handle: "joshka.net", 10 description: "Rust, TUIs, and the occasional git plumbing yak-shave.", 11 followers: 128, 12 following: 87, 13 viewerFollowRkey: null, 14 isSelf: true 15 }; 16 17 const { Story } = defineMeta({ 18 title: "Profile/FollowCard", 19 component: FollowCard, 20 tags: ["autodocs"], 21 argTypes: { 22 border: { control: "boolean" }, 23 shadow: { control: "boolean" }, 24 background: { control: "boolean" } 25 }, 26 args: { 27 person, 28 border: false, 29 shadow: false, 30 background: false 31 } 32 }); 33</script> 34 35<!-- default: layout-only (plain), as used on the timeline --> 36<Story name="Plain (timeline)" /> 37<Story name="Bordered" args={{ border: true, background: true }} /> 38 39<Story name="With follow button"> 40 {#snippet template(args)} 41 <MockAuthProvider> 42 <FollowCard {...args} person={{ ...person, isSelf: false }} border background /> 43 </MockAuthProvider> 44 {/snippet} 45</Story>