diff --git a/src/routes/dialog/Nested.svelte b/src/routes/dialog/Nested.svelte new file mode 100644 index 0000000..bda650f --- /dev/null +++ b/src/routes/dialog/Nested.svelte @@ -0,0 +1,40 @@ + + + + + + Level: {level} + + (showChild = true)} + > + Open (1) + + (showChild = true)} + > + Open (2) + + (showChild = true)} + > + Open (3) + + + + {#if showChild} + (showChild = false)} level={level + 1} /> + {/if} + diff --git a/src/routes/dialog/index.svelte b/src/routes/dialog/index.svelte new file mode 100644 index 0000000..4a57177 --- /dev/null +++ b/src/routes/dialog/index.svelte @@ -0,0 +1,227 @@ + + + (isOpen = !isOpen)} + class="m-12 px-4 py-2 text-base font-medium leading-6 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue sm:text-sm sm:leading-5" +> + Toggle! + + + (nested = true)}>Show nested +{#if nested} + (nested = false)} /> +{/if} + console.log("done")}> + (isOpen = false)} open={isOpen}> + + + + + + + + + + + + + + + + + + + + + + + Deactivate account + + + + Are you sure you want to deactivate your account? All of + your data will be permanently removed. This action cannot + be undone. + + + + + + Choose a reason + + + + + + + + + + + Signed in as + + tom@example.com + + + + + + Account settings + + + Support + + + New feature (soon) + + + License + + + + + + Sign out + + + + + + + + + + + + + (isOpen = false)} + class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:shadow-outline-red sm:ml-3 sm:w-auto sm:text-sm" + > + Deactivate + + (isOpen = false)} + class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:shadow-outline-indigo sm:mt-0 sm:w-auto sm:text-sm" + > + Cancel + + + + + + + +
Level: {level}
+ Are you sure you want to deactivate your account? All of + your data will be permanently removed. This action cannot + be undone. +
Signed in as
+ tom@example.com +