Skip to content

Commit

Permalink
Scene characters collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
megastruktur committed Feb 20, 2024
1 parent e4bde80 commit be8fe72
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/lib/components/characters/CampaignCharactersDrawer.svelte
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
<script lang="ts">
import type { CampaignsResponse, CharactersResponse, RpgSystemsResponse } from "$lib/pocketbase-types";
import { Accordion, AccordionItem } from "@skeletonlabs/skeleton";
import CharacterSheet from "./CharacterSheet.svelte";
export let characters: CharactersResponse[]
export let rpgSystem: RpgSystemsResponse
export let campaign: CampaignsResponse
</script>

<div class="flex flex-col w-96">
{#each characters as character(character.id)}
<CharacterSheet
{character}
{rpgSystem}
{campaign}
compactVersion={true} />
{/each}
<div class="flex flex-col w-96 p-3">

<Accordion
regionControl=""
>
{#each characters as character(character.id)}

<AccordionItem open={characters.length === 1}>
<svelte:fragment slot="summary">{character.name}</svelte:fragment>
<svelte:fragment slot="content">
<CharacterSheet
{character}
{rpgSystem}
{campaign}
compactVersion={true} />
</svelte:fragment>
</AccordionItem>
{/each}
</Accordion>
</div>

0 comments on commit be8fe72

Please sign in to comment.