feat(ui): remove storybook

This commit is contained in:
Max Richter
2026-01-18 15:17:56 +01:00
parent 22f285eaff
commit 4217621574
20 changed files with 168 additions and 312 deletions

View File

@@ -1,29 +1,51 @@
<script lang="ts">
import '$lib/app.css';
import Float from '$lib/elements/Float.svelte';
import Integer from '$lib/elements/Integer.svelte';
import Vec3 from '$lib/elements/Vec3.svelte';
import { Checkbox, Details, Float, Integer, Select, ShortCut, Vec3 } from '$lib/index.js';
import Section from './Section.svelte';
let intValue = $state(0);
let floatValue = $state(0.2);
let vecValue = $state([0.2, 0.3, 0.4]);
const options = ['strawberry', 'raspberry', 'chickpeas'];
let selectValue = $state(0);
const d = $derived(options[selectValue]);
let checked = $state(false);
let detailsOpen = $state(false);
</script>
<main>
<section>
<h3>Integer {intValue}</h3>
<main class="flex flex-col gap-8 py-8">
<h1 class="text-4xl">@nodarium/ui</h1>
<Section title="Integer" value={intValue}>
<Integer bind:value={intValue} />
</section>
</Section>
<section>
<h3>Float {floatValue}</h3>
<Section title="Float" value={floatValue}>
<Float bind:value={floatValue} />
</section>
</Section>
<section>
<h3>Vec3 {JSON.stringify(vecValue)}</h3>
<Section title="Vec3" value={JSON.stringify(vecValue)}>
<Vec3 bind:value={vecValue} />
</section>
</Section>
<Section title="Select" value={d}>
<Select bind:value={selectValue} {options} />
</Section>
<Section title="Checkbox" value={checked}>
<Checkbox bind:value={checked} />
</Section>
<Section title="Details" value={detailsOpen}>
<Details title="More Information" bind:open={detailsOpen}>
<p>Here is some more information that was previously hidden.</p>
</Details>
</Section>
<Section title="Shortcut">
<ShortCut ctrl key="S" />
</Section>
</main>
<style>