mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
parent
ba2e77eb47
commit
6ca6af94eb
3 changed files with 14 additions and 2 deletions
|
@ -1,8 +1,10 @@
|
|||
<script>
|
||||
import { Button } from "../Button";
|
||||
import { TextInput, PasswordInput } from "../TextInput"
|
||||
import Modal from "./Modal.svelte";
|
||||
|
||||
let open = $$props.open;
|
||||
let type = "password";
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
@ -29,6 +31,10 @@
|
|||
on:submit={() => {
|
||||
console.log('submit');
|
||||
}}>
|
||||
<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>
|
||||
</div>
|
||||
<p>
|
||||
This component supports two-way binding by default. Please see ComposedModal
|
||||
for piecemeal functionality.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue