Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

余計な警告が出ないよう対応 #8

Merged
merged 6 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/modals/Alert.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { createEventDispatcher } from 'svelte';
export const dispatch = createEventDispatcher();
export let close;
// svelte-ignore unused-export-let
export let awaitClose;

export let title = '';
Expand Down
4 changes: 1 addition & 3 deletions src/lib/modals/Confirm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { createEventDispatcher } from 'svelte';
export const dispatch = createEventDispatcher();
export let close;
// svelte-ignore unused-export-let
export let awaitClose;

export let title = '';
Expand Down Expand Up @@ -59,9 +60,6 @@
.word-break-word {
word-break: break-all;
}
.p8 {
padding: 8px;
}
.p16 {
padding: 16px;
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/modals/Prompt.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { createEventDispatcher } from 'svelte';
export const dispatch = createEventDispatcher();
export let close;
// svelte-ignore unused-export-let
export let awaitClose;

export let title = '';
Expand All @@ -26,6 +27,7 @@
+if('message')
p.text-center.white-space-pre-wrap.word-break-word {message}
div.f
// svelte-ignore a11y-autofocus
input.s-full.p8.rounded-8.bg-white(bind:value='{value}', type='text', autofocus)
div.f
button.bg-transparent.border-none.f.fh.s-full.p16.cursor-pointer(type='button', on:click!='{close}') Cancel
Expand Down
2 changes: 2 additions & 0 deletions src/lib/modals/SideMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import { createEventDispatcher, onMount } from 'svelte';
export const dispatch = createEventDispatcher();
export let close;
// svelte-ignore unused-export-let
export let awaitClose;

import { goto } from '$app/navigation';

Expand Down
20 changes: 10 additions & 10 deletions src/routes/index.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<script context="module">
export async function load({fetch}) {
let res = await fetch('https://jsonplaceholder.typicode.com/posts');
let json = await res.json();
// export async function load({fetch}) {
// let res = await fetch('https://jsonplaceholder.typicode.com/posts');
// let json = await res.json();

return {
props: {
posts: json,
}
};
}
// return {
// props: {
// posts: json,
// }
// };
// }
</script>
<script>
import { onMount } from 'svelte';
import { openModal, alert, confirm, prompt } from '$lib/index';
import Post from '$components/items/Post.svelte';
export let posts = [];
// export let posts = [];
let buttons = [
{
label: 'Alert',
Expand Down