From ea19719b78448a426a52321743399cdb7879857e Mon Sep 17 00:00:00 2001 From: Hyunbin <47051820+hyunbinseo@users.noreply.github.com> Date: Mon, 16 Jan 2023 15:09:30 +0900 Subject: [PATCH] feat: update dialog example --- .../15-composition/05-modal/App.svelte | 43 ++++--- .../15-composition/05-modal/Modal.svelte | 114 +++++++----------- 2 files changed, 71 insertions(+), 86 deletions(-) diff --git a/site/content/examples/15-composition/05-modal/App.svelte b/site/content/examples/15-composition/05-modal/App.svelte index cfd3856447..f8b99107dc 100644 --- a/site/content/examples/15-composition/05-modal/App.svelte +++ b/site/content/examples/15-composition/05-modal/App.svelte @@ -1,29 +1,36 @@ - + (showModal = true)}> show modal -{#if showModal} - - - modal - adjective mod·al \ˈmō-dəl\ - + { + showModal = false; + button.focus(); + }} +> + + modal + adjective mod·al \ˈmō-dəl\ + - - of or relating to modality in logic - containing provisions as to the mode of procedure or the manner of taking effect —used of a contract or legacy - of or relating to a musical mode - of or relating to structure as opposed to substance - of, relating to, or constituting a grammatical form or category characteristically indicating predication - of or relating to a statistical mode - + + of or relating to modality in logic + + containing provisions as to the mode of procedure or the manner of taking effect —used of a contract or legacy + + of or relating to a musical mode + of or relating to structure as opposed to substance + of, relating to, or constituting a grammatical form or category characteristically indicating predication + of or relating to a statistical mode + - merriam-webster.com - -{/if} + merriam-webster.com + diff --git a/site/content/examples/15-composition/05-modal/Modal.svelte b/site/content/examples/15-composition/05-modal/Modal.svelte index baa57824bc..b35e83d7f7 100644 --- a/site/content/examples/15-composition/05-modal/Modal.svelte +++ b/site/content/examples/15-composition/05-modal/Modal.svelte @@ -1,81 +1,59 @@ - - - - - - - - - - - - close modal - + + dialog.close()}> + + + + + + + dialog.close()}>close modal + + \ No newline at end of file +