chadtmiller.com/spaces-bookclub
Book club: a Svelte demo app for atproto spaces (@atproto/lex-space)
0
0
<script lang="ts">
import type { SpaceRefString } from '@atproto/lex'
import Button from '../atoms/Button.svelte'
import CopyField from '../molecules/CopyField.svelte'
import Dialog from './Dialog.svelte'
import { inviteLink } from '../../lib/invite.ts'
let { open = $bindable(false), uri }: { open?: boolean; uri: SpaceRefString } = $props()
</script>
<Dialog
bind:open
title="Invite to the club"
description="Share this link with people you’ve added as members. Nobody else can open the club."
>
<CopyField value={inviteLink(uri)} label="Invite link" />
<ol>
<li>Add them as a member, by their handle.</li>
<li>Send them this link.</li>
<li>They open it and sign in with their own account.</li>
</ol>
{#snippet footer()}
<Button variant="primary" onclick={() => (open = false)}>Done</Button>
{/snippet}
</Dialog>
<style>
ol {
display: grid;
gap: var(--space-1);
margin: 0;
padding-left: var(--space-5);
color: var(--color-text-muted);
font-size: var(--text-sm);
}
</style>