~james/core

core/web/src/lib/components/profile/FollowCard.svelte -rw-r--r-- 829 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script lang="ts">
	import Card, { type CardVariants } from "#lib/components/ui/Card.svelte";
	import FollowCardContent from "#lib/components/profile/FollowCardContent.svelte";
	import type { FollowChange, PersonData } from "#lib/components/profile/types.ts";

	let {
		person,
		border = false,
		background = false,
		followButton = true,
		onFollow
	}: {
		person: PersonData;
		onFollow?: (change: FollowChange) => void;
		border?: CardVariants["border"];
		background?: CardVariants["background"];
		followButton?: boolean;
	} = $props();
</script>

<!-- the content picks its layout from the card's width so it still fits when the card is half the page -->
<Card {border} {background} padding={border || background ? "regular" : "none"} class="@container">
	<FollowCardContent {person} {followButton} {onFollow} />
</Card>