Update docs examples + Add Select component + Add Card, Base, Title classes

This commit is contained in:
venashial
2022-03-29 00:44:23 -07:00
parent 8c5bf55b51
commit 98baab4d03
41 changed files with 1374 additions and 849 deletions

View File

@@ -1,13 +1,10 @@
<script lang="ts">
import Chips from "$lib/components/Chips.svelte";
import Example from "../_internal/components/Example.svelte"
let foo = 'modpack'
</script>
### Simple example
<Example code={`
```svelte example
<script lang="ts">
import Chips from "omorphia/components/Chips.svelte";
</script>
<Chips options={[
{
label: 'One',
@@ -18,25 +15,16 @@
value: 'two'
}]}
/>
`}>
<Chips options={[
{
label: 'One',
value: 'one'
},
{
label: 'Two',
value: 'two'
}]}
/>
</Example>
```
### Force an option to be selected with `neverEmpty`
<Example code={`
<script>
let foo = 'modpack';
```svelte example
<script lang="ts">
import Chips from "omorphia/components/Chips.svelte";
let foo = 'modpack'
</script>
<Chips neverEmpty bind:value={foo} options={[
@@ -53,19 +41,4 @@ value: 'two'
value: 'world'
}]}
/>
`}>
<Chips neverEmpty bind:value={foo} options={[
{
label: 'Mod',
value: 'mod'
},
{
label: 'Modpack',
value: 'modpack'
},
{
label: 'World',
value: 'world'
}]}
/>
</Example>
```