docs: Improve example component + Fix sidebar on mobile

This commit is contained in:
venashial
2022-04-16 00:29:35 -07:00
parent 6aaced0c04
commit a48e6f82d1
34 changed files with 323 additions and 282 deletions

View File

@@ -1,6 +1,6 @@
Avatars are used for project icons and user profile pictures. Low resolution images are rendered pixelated to preserve pixel art.
```svelte example
```svelte example raised
<script lang="ts">
import { Avatar } from "omorphia";
</script>

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { Badge } from "omorphia";
</script>

View File

@@ -6,12 +6,12 @@
import IconDownload from 'virtual:icons/heroicons-outline/download'
</script>
<Button color="primary"><IconDownload /> Download</Button>
<Button color="raised"><IconDownload /> Download</Button>
```
### Group example
### Color variants example
```svelte example
```svelte example raised
<script lang="ts">
import { Button } from "omorphia";
import IconDownload from 'virtual:icons/heroicons-outline/download'
@@ -26,6 +26,20 @@
<Button color="danger-light">Light danger button</Button>
<Button color="transparent">Transparent button</Button>
<Button disabled>Disabled button</Button>
</div>
```
### With icons example
```svelte example raised
<script lang="ts">
import { Button } from "omorphia";
import IconDownload from 'virtual:icons/heroicons-outline/download'
import IconHeart from 'virtual:icons/heroicons-outline/heart'
</script>
<div class="button-group">
<Button color="primary"><IconDownload /></Button>
<Button><IconHeart /> Follow mod </Button>
</div>
```

View File

@@ -1,6 +1,6 @@
### Text-only Example
```svelte example
```svelte example raised
<script lang="ts">
import { Checkbox } from "omorphia";
</script>
@@ -10,7 +10,7 @@
### Text with Icon Example
```svelte example
```svelte example raised
<script lang="ts">
import { Checkbox } from "omorphia";
import IconCarrot from 'virtual:icons/lucide/carrot'

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { CheckboxList } from "omorphia";
import IconSquare from 'virtual:icons/lucide/square'

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { CheckboxVirtualList } from "omorphia";
import IconStar from 'virtual:icons/heroicons-outline/star'

View File

@@ -1,6 +1,6 @@
### Simple example
```svelte example
```svelte example raised
<script lang="ts">
import { Chips } from "omorphia";
</script>
@@ -20,7 +20,7 @@
### Force an option to be selected with `neverEmpty`
```svelte example
```svelte example raised
<script lang="ts">
import { Chips } from "omorphia";

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { FormField } from "omorphia";
import { TextInput } from "omorphia";

View File

@@ -1,6 +1,6 @@
`NavRow` works well for most horizontal navigation with less than 10 items. It can be used with paths & query params, and supports specific path level (depths).
```svelte example
```svelte example raised
<script lang="ts">
import { NavRow } from "omorphia";
</script>

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { Select } from "omorphia";

View File

@@ -1,4 +1,4 @@
```svelte example
```svelte example raised
<script lang="ts">
import { TextInput } from "omorphia";
</script>