Skip to content

Commit 8e8a493

Browse files
Update init.js
1 parent 4a6a9e3 commit 8e8a493

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

src/init.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
// Initialize with default settings
2+
UniversalToaster.init();
13

2-
window.UniversalToasterConfig = {
3-
// COLORS
4-
// Set to null to allow Auto-Contrast (Recommended)
5-
backgroundColor: null, // e.g. "#333"
6-
textColor: null, // e.g. "#fff"
7-
8-
// TYPOGRAPHY
9-
fontFamily: "inherit", // Uses page font
10-
fontSize: "13px",
11-
fontWeight: "500",
12-
13-
// SHAPE
14-
borderRadius: "6px",
15-
padding: "8px 12px",
16-
boxShadow: "0 4px 12px rgba(0,0,0,0.15)"
17-
};
4+
// Or, initialize with custom options
5+
UniversalToaster.init({
6+
delay: 2000, // Wait 200ms before showing
7+
fontSize: '14px',
8+
borderRadius: '8px',
9+
backgroundColor: null, // e.g. "#333"
10+
textColor: null, // e.g. "#fff"
11+
// TYPOGRAPHY
12+
fontFamily: "inherit", // Uses page font
13+
fontSize: "13px",
14+
fontWeight: "500",
15+
// SHAPE
16+
borderRadius: "6px",
17+
padding: "8px 12px",
18+
boxShadow: "0 4px 12px rgba(0,0,0,0.15)"
19+
});

0 commit comments

Comments
 (0)