Skip to content

Commit f491189

Browse files
committed
Use runes mode
1 parent 654af0e commit f491189

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

examples/api/src/views/RecentDoc.svelte

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<script>
2-
import { addRecentDocument, getRecentDocuments, clearRecentDocuments } from '@tauri-apps/plugin-recent-doc'
2+
import {
3+
addRecentDocument,
4+
getRecentDocuments,
5+
clearRecentDocuments
6+
} from '@tauri-apps/plugin-recent-doc'
37
import { open } from '@tauri-apps/plugin-dialog'
48
5-
export let onMessage
9+
let { onMessage } = $props()
610
</script>
711

812
<div class="flex flex-col gap-2">
913
<button
1014
class="btn"
11-
on:click={async () => {
15+
onclick={async () => {
1216
try {
1317
const file = await open({
1418
multiple: false,
@@ -27,7 +31,7 @@
2731
>
2832
<button
2933
class="btn"
30-
on:click={async () => {
34+
onclick={async () => {
3135
try {
3236
const files = await getRecentDocuments()
3337
onMessage(files)
@@ -38,7 +42,7 @@
3842
>
3943
<button
4044
class="btn"
41-
on:click={async () => {
45+
onclick={async () => {
4246
try {
4347
await clearRecentDocuments()
4448
onMessage('Cleared recent documents.')
@@ -47,4 +51,4 @@
4751
}
4852
}}>Clear recent documents</button
4953
>
50-
</div>
54+
</div>

0 commit comments

Comments
 (0)