Skip to content

Commit

Permalink
Add test examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
kitschpatrol committed Jun 15, 2024
1 parent 645421d commit ed5befe
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"import": "@kitschpatrol/cspell-config"
"import": "@kitschpatrol/cspell-config",
"words": ["0b5vr"]
}
34 changes: 34 additions & 0 deletions src/examples/tests/TestGridLayoutPane.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script lang="ts">
import { Checkbox, Pane, Slider } from '$lib';
let colors = 0.95;
let darkMode = true;
let numbers = true;
let oneMore = true;
</script>

<Pane position="inline" theme={{ bladeValueWidth: '244px' }} width={337}>
<Slider bind:value={colors} min={0} max={1} label="Colors" />
<Checkbox bind:value={darkMode} label="Dark Mode" />
<Checkbox bind:value={numbers} label="Numbers" />
<Checkbox bind:value={oneMore} label="One More" />
</Pane>

<style>
:global(div.tp-rotv_c) {
display: flex;
flex-wrap: wrap;
}
:global(div.tp-lblv) {
flex-grow: 1;
}
:global(.tp-lblv:has(.tp-ckbv)) {
flex-direction: row-reverse;
flex-grow: 0;
}
:global(.tp-lblv_v:has(.tp-ckbv)) {
width: fit-content;
}
</style>
File renamed without changes.
14 changes: 14 additions & 0 deletions src/examples/tests/TestInvisibleFolder.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script lang="ts">
import { Checkbox, Folder, Pane } from '$lib';
let expanded = true;
let darkMode = true;
let numbers = true;
</script>

<Pane title="" userExpandable={false}>
<Checkbox bind:value={expanded} label="Expanded" />
<Folder {expanded}>
<Checkbox bind:value={darkMode} label="Dark Mode" />
<Checkbox bind:value={numbers} label="Numbers" />
</Folder>
</Pane>

0 comments on commit ed5befe

Please sign in to comment.