chore(changelog): v0.9.6 notes

This commit is contained in:
Eric Liu 2020-08-15 06:20:43 -07:00
commit a5721a36dd
6 changed files with 32 additions and 11 deletions

View file

@ -3,7 +3,7 @@
const { modalBody } = $$props;
import { Button } from "../Button";
import { TextInput, PasswordInput } from "../TextInput"
import { TextInput, PasswordInput } from "../TextInput";
import ComposedModal from "./ComposedModal.svelte";
import ModalHeader from "./ModalHeader.svelte";
import ModalBody from "./ModalBody.svelte";
@ -14,16 +14,25 @@
</script>
{#if story === undefined}
<ComposedModal {...$$props.composedModal} on:click={(e) => {
console.log(e.target)
}}>
<ComposedModal
{...$$props.composedModal}
on:click={(e) => {
console.log(e.target);
}}>
<ModalHeader {...$$props.modalHeader} />
<ModalBody
{...$$props.modalBody}
aria-label={modalBody.hasScrollingContent ? 'Modal content' : undefined}>
<div>
<PasswordInput bind:type placeholder="Password Input" aria-level="" />
<Button kind="ghost" size="field" on:click="{() => {type = type === 'password' ? 'text' : 'password'}}">Programmatically toggle password</Button>
<Button
kind="ghost"
size="field"
on:click={() => {
type = type === 'password' ? 'text' : 'password';
}}>
Programmatically toggle password
</Button>
</div>
<p>
Please see ModalWrapper for more examples and demo of the functionality.

View file

@ -1,6 +1,6 @@
<script>
import { Button } from "../Button";
import { TextInput, PasswordInput } from "../TextInput"
import { TextInput, PasswordInput } from "../TextInput";
import Modal from "./Modal.svelte";
let open = $$props.open;
@ -19,7 +19,7 @@
{...$$props}
bind:open
on:click={(e) => {
console.log(e.target)
console.log(e.target);
}}
on:click:button--secondary={() => {
console.log('click button secondary');
@ -36,7 +36,14 @@
}}>
<div>
<PasswordInput bind:type placeholder="Password Input" aria-level="" />
<Button kind="ghost" size="field" on:click="{() => {type = type === 'password' ? 'text' : 'password'}}">Programmatically toggle password</Button>
<Button
kind="ghost"
size="field"
on:click={() => {
type = type === 'password' ? 'text' : 'password';
}}>
Programmatically toggle password
</Button>
</div>
<p>
This component supports two-way binding by default. Please see ComposedModal