@@ -32,33 +32,59 @@ export default class UieCustomDialogsDashboard extends UmbElementMixin(LitElemen
3232
3333 render ( ) {
3434 return html `
35- <uui- box>
35+ <umb- code-block copy= "true" > Your last action was : <b> ${ this . message ?? "Nothing clicked yet..." } </ b>
36+ With data : ${ this . returnData ?? "{}" } </ umb- code-block>
37+
38+ <uui- box style= "margin-top:20px;" >
3639 <div slot= "header" class = "header-bar" >
3740 <div>
3841 <h5 class= "title" > Modals <br/ > <span class= "sub-header" > Modals are the mechanism to display content on-top of the current display .</ span> </ h5>
3942 </ div>
4043 </ div>
4144 <div slot= "header-actions" >
4245 <uui- butto n href= "https://apidocs.umbraco.com/v14/ui/?path=/docs/uui_layout-modals-documentation--docs" target = "_blank" look = "primary" color = "positive" >
43- <uui- badge slot= "extra" label = "A11Y label" > !</ uui- badge>
4446 <uui- icon name= "info" > </ uui- icon>
4547 View the Storybook library </ uui- butto n>
48+ <uui- butto n href= "https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/modals/confirm-dialog" target = "_blank" look = "primary" color = "positive" >
49+ <uui- icon name= "info" > </ uui- icon>
50+ View the dialog tutorial </ uui- butto n>
4651 </ div>
4752 <slot>
48- <p> The overlay service has a confirm option built , in with this you can quickly create a confirm dialog , to present your users with a simple option . The term "Modal" covers both types of pop-overs ; <b> Dialogs </ b> and <b> Sidebars </ b> .</ p>
49- <!- - https: / / docs.umbraco .com / umbraco- cms/ custo mizing/ extending- overview/ extension- types/ modals/ confirm- dialog - - >
50- <p> You can checkout all of the prebuilt modals by checking the <a href= "https://github.com/umbraco/Umbraco.CMS.Backoffice/tree/849368269126fa816aca394e8e41ef1703cfe0c2/src/packages/core/modal/token" target = "_blank">GitHub Source</a></p>
53+ <p> The term "Modal" covers both types of pop-overs ; <b> Dialogs </ b> and <b> Sidebars </ b> . You can see examples below that define how you would open an Umbraco pre-built modal .</ p>
54+
55+ <p> Modals come in two parts ; the element and the to ken.<br/ >
56+ The <b> token </ b> is responsible for triggering the modal to be displayed using the <a href= "https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/modals#basic-usage" target = "_blank"> ModalManagerContext </ a> <br/ >
57+ The <b> element </ b> is the UI components and is responsible for showing the HTML on screen , along with any in-modal functionality
58+ </ p>
59+
60+ <p> You can see all of the prebuilt modals by checking the <a href= "https://github.com/umbraco/Umbraco.CMS.Backoffice/tree/849368269126fa816aca394e8e41ef1703cfe0c2/src/packages/core/modal/token" target = "_blank">GitHub Source</a></p>
5161
5262 <uui-button look=" primary" color=" default" @click=${ this . _openConfirmationModal } >Confirm Dialog</uui-button>
5363 <uui-button look=" primary" color=" danger" @click=${ this . _openDebugDialog } >Debug Sidebar</uui-button>
5464 <uui-button look=" secondary" color=" danger" @click=${ this . _openCodeDialog } >Code Editor Sidebar</uui-button>
55- <uui-button look=" primary" color=" warning" @click=${ this . _openCustomSidebar } >Custom Sidebar</uui-button>
56- <uui-button look=" outline" color=" positive" @click=${ this . _openCustomModal } >Custom Dialog</uui-button>
5765
58- <p>Your last action was: <b> ${ this . message ?? "Nothing clicked yet..." } </b> </p>
59- <p>With data: <code> ${ this . returnData ?? "{}" } </code></p>
66+ <p></p>
67+ <p></code></p>
6068
6169 </slot>
70+ </uui-box>
71+ <uui-box style=" margin-top: 20px;">
72+ <div slot=" header" class=" header-bar">
73+ <div>
74+ <h5 class=" title">Custom Modals</h5>
75+ </div>
76+ </div>
77+ <div slot=" header-actions">
78+ <uui-button href=" https: / / docs.umbraco .com / umbraco- cms/ custo mizing/ extending- overview/ extension- types/ modals/ custo m- modals" target=" _blank" look=" primary" color=" positive">
79+ <uui-icon name=" info"></uui-icon>
80+ View the custom modal tutorial</uui-button>
81+ </div>
82+ <slot>
83+ <p>When you have specific requirements and the inbuilt modals don't suit your needs, you can create your own custom modal and put anything you want in there.</p>
84+
85+ <uui-button look=" primary" color=" warning" @click=${ this . _openCustomSidebar } >Custom Sidebar</uui-button>
86+ <uui-button look=" outline" color=" positive" @click=${ this . _openCustomModal } >Custom Dialog</uui-button>
87+ </slot>
6288 </uui-box>`
6389 }
6490
@@ -71,11 +97,10 @@ export default class UieCustomDialogsDashboard extends UmbElementMixin(LitElemen
7197 const ctx = this . #modalManagerContext?. open ( this , UMB_CODE_EDITOR_MODAL , {
7298 data : {
7399 headline :"text" ,
74- content :"Enter something" ,
100+ content :"Enter something and it will be sent back from the modal " ,
75101 language :"javascript"
76102 } ,
77103 } ) ;
78-
79104 ctx ?. onSubmit ( ) . then ( ( e ) => {
80105 this . _handleSubmit ( true , JSON . stringify ( e ) ) ;
81106 } ) . catch ( ( ) => {
0 commit comments