You've already forked AstralRinth
Add Modal
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
<script context="module" lang="ts">
|
||||
import { addMessages, init } from 'svelte-intl-precompile'
|
||||
import en from '$locales/en'
|
||||
addMessages('en', en)
|
||||
init({
|
||||
initialLocale: 'en',
|
||||
fallbackLocale: 'en',
|
||||
})
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import '$package/styles.postcss'
|
||||
import '../docs/styles/prism-one-dark.css'
|
||||
|
||||
@@ -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">
|
||||
|
||||
15
src/routes/components/Modal.md
Normal file
15
src/routes/components/Modal.md
Normal 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>
|
||||
```
|
||||
16
src/routes/components/ModalDeletion.md
Normal file
16
src/routes/components/ModalDeletion.md
Normal 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 />
|
||||
```
|
||||
Reference in New Issue
Block a user