Add Modal

This commit is contained in:
venashial
2022-06-13 11:34:46 -07:00
parent ed3535e9c9
commit f2cb6ce972
19 changed files with 661 additions and 19 deletions

View File

@@ -1,8 +1,6 @@
```svelte example raised
<script lang="ts">
import { FormField } from 'omorphia'
import { Slider } from 'omorphia'
import { TextInput } from 'omorphia'
import { FormField, Slider, TextInput } from 'omorphia'
</script>
<FormField label="Favorite number">

View File

@@ -0,0 +1,15 @@
```svelte example raised
<script lang="ts">
import { Modal, Checkbox, Button } from 'omorphia'
import IconArrowRight from 'virtual:icons/heroicons-outline/arrow-right'
let open = false
</script>
<Checkbox bind:checked={open}>Open modal</Checkbox>
<Modal title="Example modal" danger cancelButton bind:open>
<p>Secret message goes here!</p>
<Button color="primary" slot="button"><IconArrowRight /> Continue</Button>
</Modal>
```

View File

@@ -0,0 +1,16 @@
```svelte example raised
<script lang="ts">
import { ModalDeletion, Button } from 'omorphia'
let open = false
</script>
<Button
color="danger"
on:click={() => {
open = true
}}>
Delete account
</Button>
<ModalDeletion type="account" key="venashial" bind:open />
```