Skip to content

Commit 3e7df3c

Browse files
committed
Classes are joined with spaces.
I'm a fool.
1 parent c008a68 commit 3e7df3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simpletoast.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
const el = document.createElement('div');
131131
if (className) {
132132
const clazz = className.toast || className;
133-
el.className = Array.isArray(clazz) ? clazz.join(',') : (typeof clazz === 'string' ? clazz : undefined);
133+
el.className = Array.isArray(clazz) ? clazz.join(' ') : (typeof clazz === 'string' ? clazz : undefined);
134134
}
135135
applyCSS(el, style.toast);
136136
applyCSS(el, css.toast || css);
@@ -165,7 +165,7 @@
165165
const elb = document.createElement('button');
166166
if (button.className || className && className.button) {
167167
const clazz = button.className || className.button;
168-
elb.className = Array.isArray(clazz) ? clazz.join(',') : clazz;
168+
elb.className = Array.isArray(clazz) ? clazz.join(' ') : clazz;
169169
}
170170
elb.innerHTML = button.text;
171171
applyCSS(elb, style.button);

0 commit comments

Comments
 (0)