Skip to content

Commit 031fdc4

Browse files
atomrcjvanbruegge
authored andcommitted
Add the option to set a class to the global app wrapper (#23)
1 parent 51de023 commit 031fdc4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modalify.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface Options {
2929
DOMDriverKey? : string;
3030
center? : boolean;
3131
modalContainerClass? : string;
32+
wrapperClass? : string;
3233
background? : string;
3334
zIndex? : number;
3435
}
@@ -37,6 +38,7 @@ export function modalify(main : Component, {
3738
name = 'modal',
3839
DOMDriverKey = 'DOM',
3940
center = true,
41+
wrapperClass = null,
4042
modalContainerClass = null,
4143
background = 'rgba(0,0,0,0.8)',
4244
zIndex = 500
@@ -85,7 +87,7 @@ export function modalify(main : Component, {
8587
sinks[DOMDriverKey] as Stream<VNode>,
8688
modalVDom$
8789
)
88-
.map<VNode>(([vdom, modals]) => h('div', {}, [
90+
.map<VNode>(([vdom, modals]) => h('div', { attrs: { class: wrapperClass || '' }}, [
8991
vdom,
9092
center && modals.length > 0 ?
9193
displayModals(

0 commit comments

Comments
 (0)