fix(ts_web): resolve TypeScript nullability and event typing issues across web components
This commit is contained in:
@@ -49,7 +49,7 @@ export const demoFunc = () => html`
|
||||
heading: 'With Help Button',
|
||||
showHelpButton: true,
|
||||
onHelp: async () => {
|
||||
const helpModal = await DeesModal.createAndShow({
|
||||
await DeesModal.createAndShow({
|
||||
heading: 'Help',
|
||||
width: 'small',
|
||||
showCloseButton: true,
|
||||
@@ -60,7 +60,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Got it',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
},
|
||||
@@ -70,7 +70,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'OK',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>With Help Button</dees-button>
|
||||
@@ -85,7 +85,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Close',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>No Close Button</dees-button>
|
||||
@@ -101,7 +101,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Done',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Both Buttons</dees-button>
|
||||
@@ -116,7 +116,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Close',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Clean Header</dees-button>
|
||||
@@ -136,10 +136,10 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Cancel',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'OK',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Small Modal</dees-button>
|
||||
@@ -157,10 +157,10 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Cancel',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Sign Up',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Medium Modal</dees-button>
|
||||
@@ -181,10 +181,10 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Cancel',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Save',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Large Modal</dees-button>
|
||||
@@ -207,10 +207,10 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Save',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Cancel',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Fullscreen Modal</dees-button>
|
||||
@@ -230,7 +230,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Close',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Custom 700px</dees-button>
|
||||
@@ -245,7 +245,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Got it',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Max Width 600px</dees-button>
|
||||
@@ -260,7 +260,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'OK',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Min Width 400px</dees-button>
|
||||
@@ -279,13 +279,13 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Delete',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Cancel',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Save Changes',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Three Buttons</dees-button>
|
||||
@@ -298,7 +298,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Acknowledge',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Single Button</dees-button>
|
||||
@@ -322,10 +322,10 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Discard All Changes',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}, {
|
||||
name: 'Save and Continue Editing',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Long Labels</dees-button>
|
||||
@@ -347,7 +347,7 @@ export const demoFunc = () => html`
|
||||
`,
|
||||
menuOptions: [{
|
||||
name: 'Close',
|
||||
action: async (modal) => modal.destroy()
|
||||
action: async (modal) => modal!.destroy()
|
||||
}],
|
||||
});
|
||||
}}>Test Responsive</dees-button>
|
||||
|
||||
Reference in New Issue
Block a user