-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
38 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
<script lang="ts"> | ||
import FocusKey, { focusKey } from "../types"; | ||
import FocusKeyDirectImport from "../types/FocusKey.svelte"; | ||
import FocusKeyDirectImport, { | ||
FocusKeyProps, | ||
} from "../types/FocusKey.svelte"; | ||
let element: HTMLInputElement; | ||
let key: FocusKeyProps["key"] = ["s"]; | ||
</script> | ||
|
||
<input bind:this={element} /> | ||
|
||
<!-- svelte-ignore missing-declaration --> | ||
<FocusKey {element} key="s" selectText /> | ||
|
||
<!-- svelte-ignore missing-declaration --> | ||
<FocusKeyDirectImport {element} /> | ||
|
||
<input use:focusKey /> | ||
|
||
<input use:focusKey={{ key: "s", selectText: true }} /> | ||
<FocusKeyDirectImport {element} {key} /> | ||
<input use:focusKey={{ key: ["s"], selectText: true }} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters