-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (34 loc) · 957 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function borderpack(options) {
let elements = document.querySelectorAll('.borderpack');
if (options.border_type === 'dashed') {
options.border_type = 'dashed';
}
else if (options.border_type === 'dotted') {
options.border_type = 'dotted';
}
else if (options.border_type === 'solid') {
options.border_type = 'solid';
}
else if (options.border_type === 'double') {
options.border_type = 'double';
}
else if (options.border_type === 'groove') {
options.border_type = 'groove';
}
else if (options.border_type === 'ridge') {
options.border_type = 'ridge';
}
else if (options.border_type === 'inset') {
options.border_type = 'inset';
}
else if (options.border_type === 'outset') {
options.border_type = 'outset';
}
else {
options.border_type = 'none';
}
elements.forEach(image => {
image.style.borderStyle = `${options.border_type}`;
})
}
module.exports.borderpack = borderpack;