begin building demos
This commit is contained in:
@@ -4,4 +4,4 @@
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
{@render children()}
|
||||
<div class="px-8 py-4">{@render children()}</div>
|
||||
|
||||
@@ -1,3 +1,44 @@
|
||||
<h1>Welcome to your library project</h1>
|
||||
<p>Create your package using @sveltejs/package and preview/showcase your work with SvelteKit</p>
|
||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
<script>
|
||||
import Button from '$lib/Button.svelte';
|
||||
import Combobox from '$lib/Combobox.svelte';
|
||||
</script>
|
||||
|
||||
<h1 class="mb-4 text-3xl font-bold">sui — Opinionated Svelte 5 UI toolkit</h1>
|
||||
|
||||
<p class="mb-4">
|
||||
Welcome to the Svelte UI toolkit! This is a collection of components and utilities designed to
|
||||
help you build Svelte applications quickly and efficiently.
|
||||
</p>
|
||||
|
||||
<h2 class="mb-2 text-2xl font-semibold">Component Library</h2>
|
||||
|
||||
<p class="comp-title">Button</p>
|
||||
<div class="flex gap-4">
|
||||
<Button icon="add" loading={false} onclick={() => alert('Button clicked!')}>Click Me</Button>
|
||||
<Button icon="add" loading={true} onclick={() => alert('Button clicked!')}>Loading Button</Button>
|
||||
</div>
|
||||
|
||||
<div class="component">
|
||||
<p class="comp-title">Combobox</p>
|
||||
|
||||
<Combobox
|
||||
name="example-combobox"
|
||||
label="Select an option"
|
||||
placeholder="Choose..."
|
||||
items={[
|
||||
{ value: 'option1', label: 'Option 1' },
|
||||
{ value: 'option2', label: 'Option 2' },
|
||||
{ value: 'option3', label: 'Option 3' }
|
||||
]}
|
||||
onchange={(e) => console.log('Selected:', e.value)}
|
||||
onvalidate={(e) => console.log('Validation:', e.detail)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
@reference '$lib/styles/theme.css';
|
||||
|
||||
.comp-title {
|
||||
@apply mb-2 text-lg font-semibold;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user